-
-
Notifications
You must be signed in to change notification settings - Fork 235
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
fix: /user/[username]
route/page browser support issue
#1580
fix: /user/[username]
route/page browser support issue
#1580
Conversation
✅ Deploy Preview for design-insights ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for oss-insights ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Looks like Next.js is polyfilling this. See vercel/next.js#44436. Not sure what version it will land in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍕
## [1.61.0-beta.8](v1.61.0-beta.7...v1.61.0-beta.8) (2023-08-22) ### 🐛 Bug Fixes * fix crash on `/user/[username]` route due to browser support issue ([#1580](#1580)) ([336a43e](336a43e))
## [1.61.0](v1.60.0...v1.61.0) (2023-08-24) ### 🍕 Features * "Following" button to "Unfollow" on hover ([#1588](#1588)) ([721cc36](721cc36)) * add Maintainer badge to dashboard `HoverCard` and `ContributorCard` ([#1586](#1586)) ([ea34f7e](ea34f7e)) * add subscription management section to user settings ([#1587](#1587)) ([3ceb2c8](3ceb2c8)) * highlight blogs ([#1555](#1555)) ([4058f79](4058f79)) * Support full URLs when adding repo to insights page ([#1470](#1470)) ([ee53414](ee53414)) ### 🐛 Bug Fixes * "53y" showing up as first PR age in Contributor hover Card for dashboard ([#1609](#1609)) ([03522c9](03522c9)) * add bg color to reports select filter ([#1570](#1570)) ([90f381c](90f381c)) * correct position of create highlight button ([#1565](#1565)) ([2ce44bd](2ce44bd)) * corrected Alignment for mobile view ([#1578](#1578)) ([0d23330](0d23330)) * corrected repo card for mobile ([#1577](#1577)) ([779862d](779862d)) * fix crash on `/user/[username]` route due to browser support issue ([#1580](#1580)) ([336a43e](336a43e)) * highlights nav item unselected when there were query params in URL ([#1584](#1584)) ([68c3916](68c3916)) * highlights page endless flicker on tab change (1576) ([#1582](#1582)) ([56a3da9](56a3da9)) * keep UserCard from leaving the viewport on sticky sidebar ([#1585](#1585)) ([5b33b13](5b33b13)) * overflows in insights page on md screen size ([#1590](#1590)) ([69ec31e](69ec31e)) * query param reset in repo filters & URL encoding ([#1597](#1597)) ([c5c7df3](c5c7df3)) * refetch following count after following a user ([#1596](#1596)) ([cb31fd1](cb31fd1)) * remove tagged repos from highlight ([#1595](#1595)) ([26a2be6](26a2be6)) * show checkbox for repos table in small screens ([#1559](#1559)) ([a6e6bb3](a6e6bb3)) * update react-spring imports and upgrade @react-spring/web ([#1567](#1567)) ([44c80af](44c80af))
Description
This Pull Request addresses the browser compatibility issue causing regression on the
/user/[username]
route on some mobile browsers, which arose from the usage ofat
array method in the component below...https://github.com/open-sauced/insights/blob/c4c56098826f085e5c551e088ac4fc3ada969f34/components/organisms/ContributorProfileTab/contributor-profile-tab.tsx#L67
Changes Made
router.pathname.split('/')
, I replaced the usage ofat
array method with a computation of[array].length - 1
then use the derived value asindex
to access needed item.What type of PR is this? (check all applicable)
Related Tickets & Documents
Fixes #1493
Mobile & Desktop Screenshots/Recordings
Before
After
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2023.08.19-18_14_05.webm
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
NA
[optional] What gif best describes this PR or how it makes you feel?