version switch: turn into a custom element #104778
No reviewers
Labels
No Label
Meta
Good First Issue
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds, Tests & Devices
Module
Python API
Module
Rendering & Cycles
Module
Sculpt, Paint & Texture
Module
User Interface
Module
VFX & Video
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Information from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-manual#104778
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Tobias/blender-manual:switcher-two"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
store single state as class
to be then replaced by upcoming custom states
https://html.spec.whatwg.org/multipage/custom-elements.html#custom-state-pseudo-class
remove function name prefix no longer confusable with JQuery
move animation to css
transition requires visibility instead of display
not toggle/ replace event listeners
no class properties
split toggle function
css: use tagnames instead of class if not div
rename class selected -> current
mark previously selected with a class
multiple states? like a deactivated attr
minimize var names?
rename to "variant selector" better in a separate commit
WIP: version switch: turn into a custom elementto version switch: turn into a custom element77febf6234
to7409670ef6
What is the advatage of using a custom element? Seems like this can be done with pure HTML. Refactoring out the dropdown to a small JS library might make more sense... Or is there an existing library we could use?
It has no disadvantages and it's the current way of implementing custom widgets so it's better comparable.
Also
this
points to the element instead of having two withthis.menu
.A small lib is a security issue and the main bulk of work on this is done.
Checkout
From your project repository, check out a new branch and test the changes.