Giter VIP home page Giter VIP logo

Comments (11)

sizzlemctwizzle avatar sizzlemctwizzle commented on July 20, 2024

I don't like it. I'm not willing to add yet another level of nesting to the JSON, especially when all it achieves is a cosmetic change.

You have to remember these are settings for managing values and aren't meant to control the layout of the resulting window. GM_config focuses on functionality and not looks. That should be left to the author of the script using CSS and Javascript(through the use of callbacks).

I also really don't like how the fields and labels are wrapped in an unnamed object. That sort of nesting looks confusing to me.

#23 sounds like a much better compromise to specifying the order of elements.

from gm_config.

Martii avatar Martii commented on July 20, 2024

While #23 will be appreciated for standardizing the toolkit for left aligned text wrapping this ticket would also allow multiple columns instead of just a single column... so if there was a label in one column and then below it a bunch of checkboxes in some sort of matrix (say 5 x 3 ) this would allow it it as well... not just a cosmetic but the ability to maximize the available space for the UI depending on the questions/actions offered. ;) Granted this would need to be a recursive creation.

For example:

Lets say I create an options dialog that asks... (X being a checkbox or radio button depending on my implied logic)

Where do you want to float the button(s) on the the screen?

X upper-left     X upper-left-middle     X upper-middle     X upper-right-middle    X upper-right
X middle-left    X middle-left-middle    X middle-middle    X middle-right-middle   X middle-right
X lower-left     X lower-left-middle     X lower-middle     X lower-right-middle    X lower-right

Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
...

instead of what is currently available in GMC

Where do you want to float the button(s) on the the screen?

X upper-left
X upper-left-middle
X upper-middle
X upper-right-middle
X upper-right
X middle-left
X middle-left-middle
X middle-middle
X middle-right-middle
X middle-right
X lower-left
X lower-left-middle
X lower-middle
X lower-right-middle
X lower-right

Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
Next Option
...

As you can see anyone can quickly run out of screen real estate just with this one question/option.

from gm_config.

sizzlemctwizzle avatar sizzlemctwizzle commented on July 20, 2024

That can all be done with CSS. If you want multiple items on one line just set the wrapper div of the element to display: inline !important;. I've given that element its own id so it should be really easy(or you can use a headerless section which I've also added support for). Relying on the settings JSON to define how the elements are displayed is just bad design.

By the way, Joe already thought of what you are requesting(allowing nested fields) and its the only change I haven't pulled from his fork. On further questioning he admitted that he "just wanted the ability for similar fields to be side-by-side." Which is something I want too, but again doing this with JSON is not the right solution.

from gm_config.

sizzlemctwizzle avatar sizzlemctwizzle commented on July 20, 2024

Here's a script that can basically do what you describe but it relies on CSS and headerless sections.

from gm_config.

Martii avatar Martii commented on July 20, 2024

That can all be done with CSS.

cough not until at least this commit today after I made this issue ticket reply it wasn't possible ;) If you continued to reject this I would have done a NFR for it anyhow. Don't forget I usually know the answers to most of my questions before I ask them :) Glad you added the ability... makes GMC more adaptable.

from gm_config.

Martii avatar Martii commented on July 20, 2024

Here's a script that can basically do what you describe but it relies on CSS and headerless sections.

Btw that script is currently broken.

from gm_config.

sizzlemctwizzle avatar sizzlemctwizzle commented on July 20, 2024
not until at least this commit today
You could have but it would've required a little XPath magic in your open callback. Anyway, I'm glad I made it easier to achieve.
currently broken.
Bound to happen when you @require a webpage lol

from gm_config.

Martii avatar Martii commented on July 20, 2024

You could have but it would've required a little XPath magic in your open callback. Anyway, I'm glad I made it easier to achieve.

Not true... IE doesn't support XPath on the document object ;) hence why I'm buggin ya in other circles. :)

Bound to happen when you @require a webpage lol

hehe ;)

from gm_config.

sizzlemctwizzle avatar sizzlemctwizzle commented on July 20, 2024
IE doesn't support XPath on the document object
I didn't know GM_config even supported IE.

Edit: I did a little research and apparently IE has a JSON parser and localStorage. Crazy they have those and still no native XPath for HTML pages. So maybe GMC is IE compatible lol

Nevermind, did more research and IE doesn't support addEventListener until IE 9 so we aren't compatible after all.

from gm_config.

Martii avatar Martii commented on July 20, 2024

You see part of my point though? ;) and I'm reminded of:

... I definitely want GM_config to be compatible with as many user script enabled browsers as possible.

I think it does support some form of event listening but I am so rarely in IE

Anywho... I'll try the new ids out later this weekend have work to do today so no more play.

P.S. Safari just made it in my local news with a major vulnerability too LOL... GO FIREFOX! ;)

from gm_config.

sizzlemctwizzle avatar sizzlemctwizzle commented on July 20, 2024
I think it does support some form of event listening but I am so rarely in IE
It does but its archaic.
and I'm reminded of:
I knew I'd regret that statement. Anyway, IE users not invited to the party for now.
GO FIREFOX! ;)
I'd say that I love Firefox, but that is an understatement.
have work to do today so no more play.
Me too man :(

from gm_config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.