-
Notifications
You must be signed in to change notification settings - Fork 7
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
✨ mode selector #11
base: main
Are you sure you want to change the base?
✨ mode selector #11
Conversation
c430200
to
44e03bc
Compare
Thank you @adrianjost for beginning this! |
752c91c
to
f5cd792
Compare
@lauthieb The code is now working as expected and ready for review. Please let me know what you think. And sorry if the PR is not as focused as it could be. I've included a couple of small cleanups that felt like they would improve the pr readabilty. Screen.Recording.2024-03-01.at.13.51.48.mov |
Wow thank you @adrianjost! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @adrianjost for your contribution!
For me it's almost ok, I just have a problem with the "All" option.
I understand that this option will add all the variables from all collections, but the problem is that the value that will be shown for one key will be the first mode.
So for example if I have a bg-primary
at #FFFFFF
in Light and #000000
in Dark, the "All" option will display the value of #FFFFFF
for bg-primary
because it's the first mode in the list, therefore "All" is not really a mode option.
Maybe instead of adding "All", it could be better to have 2 select, one for selecting the collection and the other for selecting the mode. What do you think?
Thank you again for this contrib!
- Code block copy did not work anymore - rename All options for improved clarity, maybe I will split the collection & mode selector later.
Hello @adrianjost, Thanks for adjusting the code following my review. I still feel uncomfortable with the idea of having only one select that mixes the concept of "All collections" and modes: As you can see, the plugin always show all collections. But the feature of choosing all collections or only a specific collection is a great idea! What do you think about having two select instead of one? The first for choosing between "All collections" or a specific collection (by listing current file's variable collections) Thank you again for this contribution! 🙌 |
Hi @lauthieb,
I just haven't had time to implement something like that yet. My priorities at work have shifted in the last months so I couldn't commit enough time for continue working on it. I might do in the future, but I can't make promises when that would be. |
@lauthieb I've made the requested change. But I would argue that is not necessary and the collection scoped export is the more desired behaviour. At least that what turned out most useful for us. I've initially implemented the All Collections mode because I thought we need it, but being forced to only export specific collections turned out much more useful and easier to use. In the future, it can still be extended to multi-collection selects and showing only modes that are available in all selected collections but I personally have no use-case for it and would wait until demand from somebody is there. Let me know what you think. 💚 Screen.Recording.2024-05-27.at.10.40.47.mov |
Fixes the Figma Warning: > DEPRECATED: Use getVariableCollectionByIdAsync instead. This function will throw an exception if the plugin manifest contains "documentAccess": "dynamic-page".
I don't know how far I will go with this so I'm already starting a draft PR to show the progress for anyone interested to continue working on this.
It implements the basic idea of #5, making the variable modes toggelable.
Currently looks like this:
Screen.Recording.2024-02-28.at.18.23.22.mov
ToDo
split into more reviewable PRsnot perfect but good enough I guess.prettify UIgood enough