Comments (11)
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.
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.
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.
Here's a script that can basically do what you describe but it relies on CSS and headerless sections.
from gm_config.
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.
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.
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
from gm_config.
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.
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.
from gm_config.
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.
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 :(
from gm_config.
Related Issues (20)
- Mention of TypeScript types (@types/gm_config) HOT 9
- TypeScript Type Definitions HOT 2
- Select Multiple HOT 2
- Dynamically creating fields HOT 4
- radio onChange event HOT 1
- Capstone 4.0 HOT 5
- Display: flex ? HOT 1
- Redefine save and close buttons? HOT 3
- Calling get() before init() completes doesn't work anymore HOT 19
- `Object.create(null)` duplication HOT 2
- Strange issue with Unit Test HOT 2
- Alert Text in Unit Test HOT 9
- Hello, I need help with the UI style HOT 1
- Suggestion - add a property `initialized` (Promise object) HOT 1
- File pick implementation HOT 1
- TypeError: field is undefined HOT 1
- Resize window HOT 1
- Scaling config data
- Field value change event
- Does not appear to work with GM4 HOT 24
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gm_config.