-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat(KFLUXUI-177): create NamespaceProvider to use activeNamespace #100
Conversation
I have not had time to run this locally, but this is looking really good so far. Could it look something like this?: <Link {...props} to={IMPORT_PATH.createPath({ workspaceName: namespace }) + '?example=value'} /> |
Yes, returned string from createPath can be concatenated with other strings, We can also have utilities to build queryParams strings on need basis. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
==========================================
- Coverage 80.13% 80.12% -0.02%
==========================================
Files 570 578 +8
Lines 21529 21554 +25
Branches 5076 5348 +272
==========================================
+ Hits 17253 17270 +17
- Misses 4251 4258 +7
- Partials 25 26 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I noticed the use of |
Any usage of useWorkspaceInfo() should be removed. |
Fixes
https://issues.redhat.com/browse/KFLUXUI-177
Description
Route Definition Utility Implementation
This PR introduces a centralized route configuration system using the
buildRoute
utility, which provides type-safe path construction and nested route capabilities. The utility enables:1. Path Construction with parameters
2. Nested Route Extension through chaining
3. Type-Safe Parameters enforcement
NamespaceProvider
use
useNamespace
instead ofuseWorkspaceInfo
to get the active namespace.Type of change
Screen shots / Gifs for design review
How to test or reproduce?
Browser conformance: