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

Add Collapse component #398

Merged
merged 3 commits into from Dec 22, 2022
Merged

Add Collapse component #398

merged 3 commits into from Dec 22, 2022

Conversation

sjavora
Copy link
Member

@sjavora sjavora commented Dec 19, 2022

Should more things be customizable? Mainly thinking of the title/header and whether the separator should be hideable...

Resolves #352.

testCollapse 1

Screen.Recording.2022-12-19.at.12.23.33.mov

@sjavora sjavora added the feature Orbit component related changes label Dec 19, 2022
@sjavora sjavora self-assigned this Dec 19, 2022
@sjavora sjavora requested a review from a team as a code owner December 19, 2022 11:58
@PavelHolec
Copy link
Collaborator

PavelHolec commented Dec 19, 2022

The version with fixed Text is good enough for what Orbit provides in design. In real usage, the non-collapsed content will be more custom than simple text though.

On top of the existing String based init, the component should accept two ViewBuilder arguments - the collapsed version (header) and the expanded content (these two will be concatenated in the VStack). The String-based init will then call this more generic one.

@sjavora
Copy link
Member Author

sjavora commented Dec 19, 2022

Ok, what about some highlight on touchdown for the header? Currently there is none, but maybe there should be something similar to Tile?

@sjavora
Copy link
Member Author

sjavora commented Dec 19, 2022

@PavelHolec updated with header content.

@PavelHolec
Copy link
Collaborator

PavelHolec commented Dec 19, 2022

Ok, what about some highlight on touchdown for the header? Currently there is none, but maybe there should be something similar to Tile?

That would be nice. The highlight could be done as a background behind the header, driven by the Button isPressed state. This would expect the header to have a transparent background though (similar to ListChoice). It would be worth deciding how to unify this behaviour with the similar components like Tile/ListChoice in a follow-up.

@sjavora sjavora merged commit b150b08 into main Dec 22, 2022
@sjavora sjavora deleted the 352-collapse-component branch December 22, 2022 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Orbit component related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Collapse component
2 participants