Skip to content

Add option to show a back button to Navigation and View components #51

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

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

arnaugiralt
Copy link
Member

Added the option to show a back button in the Navigation (& View) component:
Screenshot 2024-02-20 at 11 27 32

@@ -12,9 +12,11 @@
class="c-view__navigation"
:assistive-title="assistiveTitle"
:current-tab="activeTab"
:show-back-button="showBackButton ? '' : null"
Copy link
Member Author

Choose a reason for hiding this comment

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

Figuring this out took me like 2 hours. Turns out that boolean properties that are passed down need to be properly casted as boolean arguments (like the disabled HTML argument), otherwise they are casted to a string and everything breaks 🥲.

See vuejs/docs#1972 (comment) and the related playground for more info.

Copy link

@@ -1,5 +1,16 @@
<template>
<div class="navigation-bar">
<button
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it make sense to use our toolkit button here? or it's better to use just the default one?

Copy link
Member Author

Choose a reason for hiding this comment

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

I went for the HTML button for ease of use, since it is easier to style. Would be trickier to do so with the toolkit button.

Copy link
Collaborator

Choose a reason for hiding this comment

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

May be good to consider some way for the future to make the toolkit button usable in those cases, or just drop it for the HTML one 😜

@paulinaczybir paulinaczybir merged commit 34b3878 into master Feb 20, 2024
@paulinaczybir paulinaczybir deleted the feat/add-back-button-to-navigation-component branch February 20, 2024 11:13
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