-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFR: Allow nested object creation #24
Comments
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. |
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. |
That can all be done with CSS. If you want multiple items on one line just set the wrapper div of the element to 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. |
Here's a script that can basically do what you describe but it relies on CSS and headerless sections. |
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. |
Btw that script is currently broken. |
not until at least this commit todayYou 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 |
Not true... IE doesn't support XPath on the
hehe ;) |
IE doesn't support XPath on the document objectI 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. |
You see part of my point though? ;) and I'm reminded of:
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! ;) |
I think it does support some form of event listening but I am so rarely in IEIt 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 :( |
New Feature Request
This is offered as a possible alternative to the issue #23 and goes along the lines of my thinking for #15 as well.
It would be helpful for coders to be able to control what happens with DOM creation.
An example init settings object could be this:
This would create the DOM something like this
This would create a third tier of object creation instead of the standard two... plus it could be backwards compatible perhaps.
Let me know what you think. :)
The text was updated successfully, but these errors were encountered: