Timeline RFC #4041
Replies: 2 comments 6 replies
-
First off, wow this is really great. I very much admire how organized this sandbox is and how clean your components are! My preference is to go with the CSS option and introduce the new attribute tagging in CSS. The only other option would be to target via the data-paste-element name but with customization that would completely break. Although maybe customization wouldn't override, we'd have to test. I would keep the same naming as you have and only expose the Timeline, TimelineItem, TimelineCollapsibleItem. Biggest improvement I can see would be to add a variant onto the TimelineItem which would be 'default'|'grouped' to handle the grouped items. The only change I really see there is adding a margin so could be done via style variants I like how you are handling the variant styles for horizontal and vertical in the Timeline component. Can we do it as a record though so we can have it similar to our existing ones here For load more I remember we discussed the option to open a side modal to have infinite scrolling. I know we have that functionality here but it would be good to get clarification when building the stage 1 storybooks. One question mainly for design is, do we want to make the date heading composable? This way they can update the text styling, bold, light color etc. For accessibility do we want to tab into the component and then be able to use a keyboard to navigate items? I feel like with this being potentially very long it might be good to focus on individual items. A few praises just form engineering side:
Here are a few nits which I know this is just an exploration but things to resolve during stage 1:
|
Beta Was this translation helpful? Give feedback.
-
Really liking where the API is headed, nice thorough exploration in the CodeSandbox. Most of the work for the entire component is done! +1 to @krisantrobus's comment about using list elements under the hood, but we might want to consider using Another +1 to the question of whether the date (or
Really like Kris's Between the two options you've laid out, I also prefer the css option which uses the data attribute over using a
|
Beta Was this translation helpful? Give feedback.
-
Hello,
Paste is adding a Timeline component and we would like to have your opinion.
A Timeline component is used to visual represent events in a chronological order. Designs are not finalised but it will look something like this:
Spec
Please give the Timeline spec a read and leave any questions or feedback as comments
Design
Take a look at the Timeline design explorations Figma and leave any design-related questions or feedback as comments
CodeSandbox
Take a look at the Timeline API explorations CodeSandbox and leave any feedback as comments here in the discussion.
Open questions
Currently we are experimenting with 2 variants of API, one uses
separator
prop to add a line between the icons of each item. Other version handles it on it's own. With the prop method, a consumer of the component has more flexibility but also a responsibility to add the prop to make sure the it looks like a Timeline component.In option 2, timeline component will handle the addition of the separator by itself, this is a more restrictive approach but also means that consumer do not have to worry about missing out on adding the prop. Which approach looks better to you?
Beta Was this translation helpful? Give feedback.
All reactions