Skip to content

[BREAKINGCHANGE] TraceTable: configure link in panel spec#211

Merged
andreasgerstmayr merged 9 commits intoperses:mainfrom
andreasgerstmayr:speclinks-tracetable
Aug 25, 2025
Merged

[BREAKINGCHANGE] TraceTable: configure link in panel spec#211
andreasgerstmayr merged 9 commits intoperses:mainfrom
andreasgerstmayr:speclinks-tracetable

Conversation

@andreasgerstmayr
Copy link
Copy Markdown
Contributor

@andreasgerstmayr andreasgerstmayr commented Jul 29, 2025

Description

Same as #210, but for TraceTable.

Screenshots

no UI changes

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

UI Changes

  • Changes that impact the UI include screenshots and/or screencasts of the relevant changes.
  • Code follows the UI guidelines.

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
@andreasgerstmayr andreasgerstmayr changed the title [BREAKINGCHANGE] TraceTable: configure attribute links in panel spec [BREAKINGCHANGE] TraceTable: configure link in panel spec Jul 29, 2025
});

return `/explore?${traceLinkParams}`;
RouterComponent?: DataTableProps['RouterComponent'];
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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).

cc @Gladorme @jgbernalp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To me it fine to have a new provider RouterProvider, its scope is clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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>
@andreasgerstmayr andreasgerstmayr marked this pull request as draft July 31, 2025 12:29
@andreasgerstmayr andreasgerstmayr marked this pull request as ready for review August 20, 2025 09:51
Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
@andreasgerstmayr andreasgerstmayr added this pull request to the merge queue Aug 25, 2025
Merged via the queue into perses:main with commit bc40f97 Aug 25, 2025
12 checks passed
@andreasgerstmayr andreasgerstmayr deleted the speclinks-tracetable branch August 25, 2025 09:57
rafi-ruetcse17 pushed a commit to opnpulse/perses_plugins that referenced this pull request Sep 1, 2025
* [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>
abelyakin pushed a commit to abelyakin/plugins that referenced this pull request Jan 14, 2026
* [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>
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.

3 participants