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

Make ProductArea badges interactive #272

Merged
merged 9 commits into from
Aug 10, 2023
Merged

Make ProductArea badges interactive #272

merged 9 commits into from
Aug 10, 2023

Conversation

jeffdaley
Copy link
Contributor

@jeffdaley jeffdaley commented Jul 25, 2023

Makes ProductArea badges clickable to initiate a product filter. Badges on the /my and /drafts are scoped to keep you on that route. All other users point to /all.

Comment on lines +38 to +42
<Person
@ignoreUnknown={{true}}
@imgURL={{@avatar}}
@email="{{@owner}}"
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can make this clickable in another PR.

@jeffdaley jeffdaley marked this pull request as ready for review August 9, 2023 20:32
@jeffdaley jeffdaley requested a review from a team as a code owner August 9, 2023 20:32
@jeffdaley jeffdaley added the enhancement New feature or request label Aug 9, 2023
{{!
We create a click area that extends beyond the edges of its relative container.
This makes the parent div clickable without having to wrap itself in a link,
and lets us nest interactive elements (e.g., ProductBadgeLink) in a way that improves the mouse experience without sacrificing accessibility.
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Comment on lines 37 to 54
protected get route() {
const { currentRouteName } = this.router;

if (!currentRouteName) {
return "authenticated.all";
}

if (currentRouteName.includes("drafts")) {
return "authenticated.drafts";
}

if (currentRouteName.includes("my")) {
return "authenticated.my";
}

return "authenticated.all";
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't immediately tell why we needed this logic - maybe a comment would help?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I probably overcomplicated it anyway 😅

Updated

@jeffdaley jeffdaley merged commit 750f7e1 into main Aug 10, 2023
2 checks passed
@jeffdaley jeffdaley deleted the jeffdaley/tile-cards branch August 10, 2023 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants