-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pulling feat/breadcrumb-fix into develop #993
Conversation
This commit simplifies the BreadcrumbsLink component by removing the breadcrumbNameMap and nonClickableRoutes variables. The component now accepts a name and path prop, which are used to render the link. This makes the component more flexible and easier to use.
…generate links based on route segments This commit introduces a refactored Breadcrumbs component that dynamically generates breadcrumb links based on the current route segments. It includes logic to filter out role-based segments, convert segments into links or plain text based on their position and existence as pages, and handle edge cases such as empty pathnames. The component now uses fp-ts for functional data manipulation, improving code readability and maintainability.
The DSC Home breadcrumb test was removed because the breadcrumb was removed from the component.
…e prop The test for non-clickable breadcrumbs was removed as it was not providing any value. The pathname prop was renamed to name to better reflect its purpose. The test for non-existent routes was removed as it was not providing any value.
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This commit removes unused code and imports from the Breadcrumbs component. The removed code includes: - The `match` function from the `ts-pattern` library - The `Rkeys` function from the `fp-ts/Record` library - The `Sreplace` function from the `fp-ts/string` library - The `RAdropLeft` function from the `fp-ts/ReadonlyArray` library - The `RAfindIndex` function from the `fp-ts/ReadonlyArray` library - The `omitSegments` variable - The `dynamicRoutes` variable - The `pages` variable These changes improve the readability and maintainability of the component.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #993 +/- ##
========================================
Coverage 90.16% 90.16%
========================================
Files 316 316
Lines 18895 18895
Branches 795 800 +5
========================================
Hits 17037 17037
Misses 1855 1855
Partials 3 3 |
No description provided.