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-1532] Improve Dependency Display on PB Website #3701

Closed
wants to merge 2 commits into from

Conversation

skduncan
Copy link
Contributor

@skduncan skduncan commented Sep 18, 2024

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

As a Playbook dev, I want to improve the way we are displaying kit dependencies on the Playbook website, so that there is no confusion when implementing our kits into Nitro.

Design will be based off of this handoff.

This PR is meant to be used as an example of how to implement these changes within Playbook and should NOT be merged.

Screenshots: Screenshots to visualize your addition/change
Screenshot 2024-09-18 at 8 43 20 AM

Problem

We want to improve the way we are display the dependencies of our kits on the Playbook website. The design of this dependency display will be based off of this handoff.

Solution

  • Updating "playbook-website/config/menu.yml” to include three new columns to track information regarding a kits dependency. This would allow us to easily pull the dependencies information of each kit to utilize in the summary display.
    • icons_used
    • react_rendered
    • enhanced_element_used
    • "playbook-website/config/menu.yml”
  // How kits are currently setup in yml
  - name: dialog
    platforms: *1
    description:
    status: stable
    // Proposed additions to yml for dependency display
    icons_used: true
    react_rendered: true
    enhanced_element_used: true
  • Updating "playbook-website/app/views/pages/kit_show.html.erb” to include a flex section for the summary display in the header portion of each kit page. We would use updated information from “menu.yml” proposed above to set a series of if conditions to track which dependencies should be displayed.

  • To make these changes more managable, we can shift the header view into its own partial (ie. "_kit_show_header.html.erb”).

  • In the case that no dependencies are used, we can set the summary flex to not be shown.

Alternative

  • An alternative solution to the above would be setting up “kit_show.html.erb” to display header partials that would be pulled from each kits directory in “playbook/pb_kits/“.
    • This change would not require anything to be updated in “menu.yml”, as we can manually set which dependencies to show in the individual partials.
    • While this should work as a solution, it is not recommended as it would add over 100 files in Playbook (currently proposed solution would only update two existing files and potentially create one new file).

Resources

@skduncan skduncan added improvement This is used when your PR contains library upgrades or doc/site improvements. (USED IN CHANGELOG)) do not merge labels Sep 18, 2024
@skduncan skduncan requested review from a team as code owners September 18, 2024 13:02
@nidaqg
Copy link
Contributor

nidaqg commented Sep 27, 2024

Closing PR as a POC, can be reopened when we revisit this work. Great work @skduncan !

@nidaqg nidaqg closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge improvement This is used when your PR contains library upgrades or doc/site improvements. (USED IN CHANGELOG))
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants