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

🐛 Switch sidebar type based on routes #1889

Merged
merged 7 commits into from
May 9, 2024

Conversation

rszwajko
Copy link
Collaborator

@rszwajko rszwajko commented Apr 26, 2024

Linked changes:

  1. fix incorrect handling of Paths.assessment and Paths.questionnaire - both were incorrectly handled as dev routes
  2. split Paths enum into type safe specialized readonly objects - DevPaths, AdminPaths and GeneralPaths

Resolves: #954

Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@rszwajko rszwajko marked this pull request as ready for review April 29, 2024 17:11
Copy link
Member

@ibolton336 ibolton336 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

I like it so far, but I have a suggestion around the targetPath prop.

client/src/app/layout/SidebarApp/SidebarApp.tsx Outdated Show resolved Hide resolved
@sjd78
Copy link
Member

sjd78 commented May 2, 2024

I did find a strange behavior:

screencast-localhost_9000-2024.05.02-17_05_10.mp4

@ibolton336 ibolton336 self-requested a review May 6, 2024 15:24
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@rszwajko rszwajko requested a review from sjd78 May 6, 2024 15:39
rszwajko and others added 3 commits May 6, 2024 18:33
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@sjd78 sjd78 added this to the v0.5.0 milestone May 7, 2024
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

Working from the AdminPaths and GeneralPaths constants through types and back out to the sidebar makes sense to me. Typescript should raise enough alarms if something is done that doesn't line up properly that the change is worth it.

Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 38.29787% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 41.22%. Comparing base (b654645) to head (e1c8527).
Report is 135 commits behind head on main.

Files Patch % Lines
client/src/app/layout/SidebarApp/SidebarApp.tsx 23.68% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1889      +/-   ##
==========================================
+ Coverage   39.20%   41.22%   +2.02%     
==========================================
  Files         146      158      +12     
  Lines        4857     5189     +332     
  Branches     1164     1269     +105     
==========================================
+ Hits         1904     2139     +235     
- Misses       2939     3032      +93     
- Partials       14       18       +4     
Flag Coverage Δ
client 41.22% <38.29%> (+2.02%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidebar falls out of sync when hard navigating to pages outside of the current personas scope
3 participants