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

🐛 [RUM-6226][rum-react] improve routes wildcard substitution #3105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Oct 31, 2024

Motivation

In #3023, we implemented wildcard substition in react-router paths. For example, on a route like /foo/*, a path /foo/bar would produce a view name /foo/bar.

It turns out we have an internal application which uses nested routes with wildcards, ex: { path: '*', children: [{ path: '*' }] }. This is probably not popular use case, but still, it exists. The issue with the previous implementation is that it duplicated the path in the view name (a path /foo would produce a view name /foo/foo).

Changes

This PR fixes this issue and consolidates the tests with more edge cases related to wildcards.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner October 31, 2024 17:19
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.52%. Comparing base (84a1fa1) to head (a8f6d04).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3105      +/-   ##
==========================================
- Coverage   93.63%   93.52%   -0.12%     
==========================================
  Files         276      276              
  Lines        7620     7625       +5     
  Branches     1711     1712       +1     
==========================================
- Hits         7135     7131       -4     
- Misses        485      494       +9     

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

3 participants