question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Align import references of Link component to use @backstage/core-components

See original GitHub issue

This issue is to collect a list of outstanding places where the Link component is imported not from @backstage/core-components but instead from other, generally 3rd party packages (e.g., MUI). The intent is to properly align the functionality of links across the system as a whole.

Links in the Backstage UI should be generated out of this component: https://backstage.io/storybook/?path=/story/navigation-link--default

Backstage Core

Plugins

Context

Specifically, @freben noted in a PR review,

Could you try to change the import of Link in this file to instead use the one from @backstage/core-components? That one is supposed to be used everywhere (but apparently wasn’t in this file), and it is meant to set target and rel automatically and correctly so you could remove these here hopefully. The other benefit is that it’ll be connected to analytics, styling etc etc in a cross-app way.

_Originally posted by @freben in https://github.com/backstage/backstage/pull/8115#discussion_r752158316_

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
WarlenRodriguescommented, Nov 18, 2021

Working on this!

0reactions
dmitry-lobanovcommented, Oct 11, 2022

Hi everyone, I had some time to work on this issue, created a PR #14050

  • aligned import references of Link component
  • added a lint rule (please let me know if there’s a better place for it)
Read more comments on GitHub >

github_iconTop Results From Across the Web

TechDocs How-To guides - Backstage.io
In your Backstage instance's app-config.yaml , set techdocs.builder from ... React from 'react'; import { Content } from '@backstage/core-components'; ...
Read more >
Material-ui adding Link component from react-router
If I try to wrap <Tab/> component into <Link/> component, I'm getting error that <Tabs/> component accepts only <Tab/> component. This doesn't work...
Read more >
Links - Material UI - MUI
The Link component allows you to easily customize anchor elements with your theme colors and typography styles.
Read more >
Link - Chakra UI
Here is an example using the Link component: import NextLink from 'next/link'. import { Link } from '@chakra-ui/react'. <Link as={NextLink} href='/home'>.
Read more >
Using the Link and NavLink Components to Navigate to a Route
React-Router provides the and components, which allow you to navigate ... import { Link } from 'react-router-dom'; classAppextendsComponent ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found