Skip to content
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

Consolidate position terminology #510

Closed
yinonov opened this issue Jul 3, 2022 · 13 comments · Fixed by #549 or #589
Closed

Consolidate position terminology #510

yinonov opened this issue Jul 3, 2022 · 13 comments · Fixed by #549 or #589
Assignees

Comments

@yinonov
Copy link
Contributor

yinonov commented Jul 3, 2022

Our goal is to consolidate the terminology used to describe the position of an element anchored to another.

popup features the corner terminology -
https://github.com/Vonage/vivid-3/tree/main/libs/components/src/lib/popup#corner

The Microsoft explainer introduces a concept of "position-set" in the context of declaring preferred anchored position, with fallbacks.
This might still be early in the process of being standardized, and it's not clear if it will be implemented in the future. it also seems to be a bit of a misnomer, as it's not a set of positions, but a set of fallbacks.

Vivid popup doesn't support such complex positioning.

Side drawer might deviate from the complexity presented here as it only allows 2 options; left and right (or start and end). A boolean member might be enough for its purpose.

@rinaok
Copy link
Contributor

rinaok commented Jul 6, 2022

Floating-ui calls it Placement instead of Corner. https://floating-ui.com/docs/computePosition#placement

@yinonov
Copy link
Contributor Author

yinonov commented Jul 6, 2022

placement is an option. position is probably more close to the explainer's position set

@rinaok
Copy link
Contributor

rinaok commented Jul 6, 2022

Regarding the Side-Drawer, we have icon-trailing so I think that the name you suggested (trailing) can be a good fit.

@rinaok
Copy link
Contributor

rinaok commented Jul 6, 2022

placement is an option. position is probably more close to the explainer's position set

Position reminds me of the position property (static, relative, fixed, absolute or sticky). Idk if it's a good name for this purpose.

@yinonov
Copy link
Contributor Author

yinonov commented Jul 8, 2022

has not progressed lately but might help with guidance
w3c/csswg-drafts#5952

@yinonov
Copy link
Contributor Author

yinonov commented Jul 9, 2022

I foresee a similar debate starting here microsoft/fast#6185 (comment)

@YonatanKra
Copy link
Contributor

@yinonov @rinaok @rachelbt
Are we going with placement then?

@rinaok
Copy link
Contributor

rinaok commented Jul 18, 2022

@yinonov @rinaok @rachelbt Are we going with placement then?

@YonatanKra At the beginning, it was Placement. vwc-menu and vwc-dropdown have Corner, and we wanted consistency. It might be better to change it to Placement in all components.

@YonatanKra
Copy link
Contributor

@rinaok
Was it decided then? I can't see a decision in this discussion. Any vivid-3 component using placement?
I see popup and tooltip are using it (probably because of floating-ui).
Maybe we can just decide on placement.

@rinaok
Copy link
Contributor

rinaok commented Jul 18, 2022

@YonatanKra it was discussed in vivid-2 while working on tooltip. I also think that placement is better than corner

@rachelbt
Copy link
Contributor

I'm also in for placement :)

Repository owner moved this from Todo 🕓 to Done ✅ in Vivid Roadmap Jul 19, 2022
@yinonov yinonov reopened this Jul 19, 2022
@rinaok
Copy link
Contributor

rinaok commented Jul 19, 2022

@yinonov What do you think? Should we change "corner" to 'placement"?

@yinonov
Copy link
Contributor Author

yinonov commented Jul 19, 2022

@yinonov What do you think? Should we change "corner" to 'placement"?

Agree 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
4 participants