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

[PLAY-1586] Timeline Sub Sub Components #3801

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

markdoeswork
Copy link
Contributor

@markdoeswork markdoeswork commented Oct 15, 2024

What does this PR do? A clear and concise description with your runway ticket url.
Runway https://runway.powerhrg.com/backlog_items/PLAY-1586

In this story we let devs add children or "what ever kit they want" to the date and node area of the timeline kit

The major changes to react is in the playbook/app/pb_kits/playbook/pb_timeline/_item.tsx and in rails i added a new pattern to be able to conditionally render fragments of content

I have an alpha here https://github.com/powerhome/nitro-web/pull/43266

Screenshots: Screenshots to visualize your addition/change

screenshot-127_0_0_1_3000-2024_10_17-09_57_21

How to test? Steps to confirm the desired behavior:

  1. Go to https://pr3801.playbook.beta.px.powerapp.cloud/kits/timeline/react#with-children
  2. Witness greatness

Checklist:

  • LABELS Add a label: enhancement, bug, improvement, new kit, deprecated, or breaking. See Changelog & Labels for details.
  • DEPLOY I have added the milano label to show I'm ready for a review.
  • TESTS I have added test coverage to my code.

@markdoeswork markdoeswork added the milano 20 MAX - Deploy this PR to a review environment via Milano label Oct 15, 2024
@markdoeswork markdoeswork self-assigned this Oct 15, 2024
@powerhome-portal
Copy link

A change to documentation files was detected in your PR. Please visit this link to preview changes: https://portal-staging.powerapp.cloud/docs?filters[kind]=all&filters[user]=all&filters[namespaceFilter]=play-1586datearea

@markdoeswork markdoeswork added enhancement New Features, Props, & Variants (USED IN CHANGELOG) alpha labels Oct 17, 2024
Copy link

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 14.5.0.pre.alpha.play1586datearea4115

Your Alpha for NPM is 14.5.0-alpha.play1586datearea4115

@markdoeswork markdoeswork marked this pull request as ready for review October 17, 2024 14:15
@markdoeswork markdoeswork requested review from a team as code owners October 17, 2024 14:15
<%= pb_rails("timeline", props: {orientation: "horizontal", show_date: true}) do %>
<%= pb_rails("timeline/item", props: { line_style: "solid"}) do |item| %>

<% item.date_area do %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying the item.date_area allows us to only update the date area

you don't have to provide the node or detail area if you don't want to.

This is needed because our node area has default functionally and it will use the icon circle kit it you dont't put anything

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After doing more research i found that github's design system uses the same pattern https://primer.style/components/action-menu/rails/alpha#examples

@jasperfurniss
Copy link
Contributor

@markdoeswork Hey Mark! I went ahead and threw my feedback into a gist: the gist

@jasperfurniss jasperfurniss self-requested a review October 22, 2024 17:14
Copy link

🎉 Congratulations on creating an Alpha Version!

Your Alpha for Ruby Gems is 14.6.0.pre.alpha.play1586datearea4218

Your Alpha for NPM is 14.6.0-alpha.play1586datearea4218

@markdoeswork
Copy link
Contributor Author

markdoeswork commented Oct 23, 2024

@jasperfurniss i made the updates you suggested and have a working code sandbox https://codesandbox.io/p/sandbox/timeline-alpha-forked-9j4dxg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha enhancement New Features, Props, & Variants (USED IN CHANGELOG) milano 20 MAX - Deploy this PR to a review environment via Milano
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants