[BREAKINGCHANGE] TraceTable: configure link in panel spec#211
[BREAKINGCHANGE] TraceTable: configure link in panel spec#211andreasgerstmayr merged 9 commits intoperses:mainfrom
Conversation
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
tracetable/src/TraceTablePanel.tsx
Outdated
| }); | ||
|
|
||
| return `/explore?${traceLinkParams}`; | ||
| RouterComponent?: DataTableProps['RouterComponent']; |
There was a problem hiding this comment.
Should I create a new context for this one?
RouterContext or PluginContext or sth, with two props: RouterComponent (by default, <Link> from react-router-dom) and navigate (by default, the function returned by useNavigate()).
This allows host applications to use different routing libraries (or different versions of react-router).
There was a problem hiding this comment.
I think it makes sense to create a provider or reuse one existing to allow custom redirection routes from plugins panels. It makes more sense to me that is a RouterContext
There was a problem hiding this comment.
To me it fine to have a new provider RouterProvider, its scope is clear.
There was a problem hiding this comment.
Thank you both for your input! I created perses/perses#3140 to implement RouterProvider with RouterContext.
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
* [BREAKINGCHANGE] TraceTable: configure attribute links in panel spec Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * use RouterContext Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * update test Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * move react-router-dom to dev dependencies (only required for tests) Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * make RouterComponent optional Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * use replaceVariablesInString utility Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> --------- Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
* [BREAKINGCHANGE] TraceTable: configure attribute links in panel spec Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * use RouterContext Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * update test Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * move react-router-dom to dev dependencies (only required for tests) Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * make RouterComponent optional Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> * use replaceVariablesInString utility Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com> --------- Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
Description
Same as #210, but for
TraceTable.Screenshots
no UI changes
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes