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

Inconsistent ordering of anatomy slot and parts #743

Closed
lukewarlow opened this issue May 2, 2023 · 3 comments · Fixed by #913
Closed

Inconsistent ordering of anatomy slot and parts #743

lukewarlow opened this issue May 2, 2023 · 3 comments · Fixed by #913
Assignees
Labels
needs edits This is ready for edits to be made

Comments

@lukewarlow
Copy link
Collaborator

What's the correct way to make anatomies. Should slots be inside of parts or vice versa? Or is it dependent on context?

I ask because currently the various anatomies aren't consistent in this regard

@gregwhitworth
Copy link
Member

Posted this on discord, and will replicate it here:

This somewhat depends on issue 702. However, whether it ends up using slots/parts is actually not as important as doing the research to understand the most common usecases and the necessary parts to unlock those.

Here is a breakdown I did for a potential update to input type=range which when paired with usecases you can arrive at a general recommended anatomy. https://open-ui.org/components/slider.research.parts/

With regards to your specific question however, it depends as the slot is meant to provide flexibility. So you may have nested slots due to being within another part whereas there's another scenario where that isn't necessary.

@lukewarlow lukewarlow added the agenda+ Use this label if you'd like the topic to be added to the meeting agenda label Oct 15, 2023
@lukewarlow
Copy link
Collaborator Author

lukewarlow commented Oct 15, 2023

Adding this to the agenda to discuss. There's examples throughout the site that seem backwards to me

The below being an example of the file structure currently and what I think it should be. This better matches "select-anatomy.jsx" too

Current:

image

Proposed:

image

@css-meeting-bot
Copy link

The Open UI Community Group just discussed Inconsistent ordering of anatomy slot and parts, and agreed to the following:

  • RESOLVED: Slots should wrap parts where the intention is to replace that part as a whole
The full IRC log of that discussion <keithamus> scribenic: keithamus
<keithamus> scribenick: keithamus
<masonf> q+
<gregwhitworth> q+
<keithamus> Luke_W: throughout openui we've got various anatomies. Parts, slots. We're moving away from the slot idea but it makes sense to document as such. There's inconsistency though - file select has part, then slot inside. Intent is slot, default (which is the part), then you can replace by putting slotted content in. So it's the wrong way around?
<keithamus> masonf: proposed looks better.
<keithamus> gregwhitworth: +1 too. Technically they're slots but it's loose. Placeholder space to insert content. Could be both.
<jarhar> q+
<gregwhitworth> ack masonf
<gregwhitworth> ack gregwhitworth
<keithamus> Luke_W: Replacing text content... but if you replace the whole part...
<keithamus> masonf: slot is on inside... you'd have a button inside a button, which makes no sense. We do have cases of nested slots but that's different
<gregwhitworth> ack jarhar
<keithamus> jarhar: clarify; we're moving away from using the slot attribute but they're still slottables, imperatively assigned
<Luke_W> Proposed Resolution: Slots should wrap parts where the intention is to replace that part as a whole
<masonf> +1
<Luke_W> RESOLVED: Slots should wrap parts where the intention is to replace that part as a whole

@lukewarlow lukewarlow added needs edits This is ready for edits to be made and removed agenda+ Use this label if you'd like the topic to be added to the meeting agenda labels Oct 26, 2023
@lukewarlow lukewarlow self-assigned this Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs edits This is ready for edits to be made
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants