Skip to content

refactor(ui): deprecates Link props#11155

Merged
jacobsfletch merged 1 commit into
mainfrom
refactor/deprecate-link-props
Feb 13, 2025
Merged

refactor(ui): deprecates Link props#11155
jacobsfletch merged 1 commit into
mainfrom
refactor/deprecate-link-props

Conversation

@jacobsfletch

@jacobsfletch jacobsfletch commented Feb 13, 2025

Copy link
Copy Markdown
Member

Deprecates all cases where Link could be sent as a prop. This was a relic from the past, where we attempted to make our UI library router-agnostic. This was a pipe dream and created more problems than it solved, for example the logout button was missing this prop, causing it to render an anchor tag and perform a hard navigation (caught in #9275).

Does so in a non-breaking way, where these props are now optional and simply unused, as opposed to removing them outright.

@jacobsfletch jacobsfletch changed the title refactor: deprecates Link props refactor(ui): deprecates Link props Feb 13, 2025
@jacobsfletch jacobsfletch merged commit cd11175 into main Feb 13, 2025
@jacobsfletch jacobsfletch deleted the refactor/deprecate-link-props branch February 13, 2025 16:11
jacobsfletch added a commit that referenced this pull request Feb 17, 2025
Deprecates all cases where `Link` could be sent as a prop. This was a
relic from the past, where we attempted to make our UI library
router-agnostic. This was a pipe dream and created more problems than it
solved, for example the logout button was missing this prop, causing it
to render an anchor tag and perform a hard navigation (caught in #9275).

Does so in a non-breaking way, where these props are now optional and
simply unused, as opposed to removing them outright.
@github-actions

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.24.0

kendelljoseph pushed a commit that referenced this pull request Feb 21, 2025
Deprecates all cases where `Link` could be sent as a prop. This was a
relic from the past, where we attempted to make our UI library
router-agnostic. This was a pipe dream and created more problems than it
solved, for example the logout button was missing this prop, causing it
to render an anchor tag and perform a hard navigation (caught in #9275).

Does so in a non-breaking way, where these props are now optional and
simply unused, as opposed to removing them outright.
PatrikKozak added a commit that referenced this pull request Feb 27, 2025
This PR resolves an issue where the `href` for the Logout button in the
admin panel included duplicate `basePath` values when `basePath` was set
in `next.config.js`.

The Logout button was recently updated to use `NextLink` (`next/link`),
which automatically applies the `basePath` from the Next.js
configuration. As a result, manually adding the `basePath` to the `href`
is no longer necessary.

Relevant PRs that modified this behavior originally: 
- #9275
- #11155
jacobsfletch added a commit that referenced this pull request Feb 27, 2025
When visiting a collection's list view, the nav item corresponding to
that collection correctly appears in an active state, but is still
rendered as an anchor tag. This makes it possible to reload the current
page by simply clicking the link, which is a problem because this
performs an unnecessary server roundtrip. This is especially apparent
when search params exist in the current URL, as the href on the link
does not.

Unrelated: also cleans up leftover code that was missed in this PR:
#11155
MrFriggo added a commit to TesseraktDevelopment/nakashi-shop that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant