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

Use anchor tags for feed #110

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Use anchor tags for feed #110

wants to merge 2 commits into from

Conversation

bryophyta
Copy link
Contributor

@bryophyta bryophyta commented Jan 24, 2025

What does this change?

The main change is to refactor the feed view so that it uses a list of links (<a> tags) instead of a table:

  • Clicking on an item is more like navigation than on-page action, as it takes you to a view corresponding to a different URL
  • Allows us to leverage the platform for cmd+click behaviour etc.
  • Also allows for more control over layout of the cards, without having to wrangle too much with Eui. In particular, it makes it easier to have a more compact layout.

Additional changes:

  • Add scroll-into-view behaviour (again, easier when we're not competing with Eui's features for this, I think)
  • Adapt the card heading to use an <EuiBadge> to display supplier info, rather than including it at the end of the headline/slug.

How to test

How can we measure success?

Have we considered potential risks?

Images

Before and after

image

Accessibility

@bryophyta bryophyta force-pushed the pf/anchor-tags-for-feed branch from 14ddcba to 0241b75 Compare January 24, 2025 16:10
@bryophyta bryophyta marked this pull request as ready for review January 24, 2025 16:17
@bryophyta bryophyta requested a review from a team as a code owner January 24, 2025 16:17
@bryophyta
Copy link
Contributor Author

re-implements some of #81

@@ -273,6 +280,32 @@ export function SearchContextProvider({ children }: PropsWithChildren) {
dispatch({ type: 'TOGGLE_AUTO_UPDATE' });
};

const Link = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth moving the Link component to it's own file.

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.

2 participants