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

fix: Remove empty back bar from confirmation component #2449

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Nov 18, 2023

What does this PR do?

  • Hides the back bar when we reach a confirmation component

This is a small visual thing which has bugged me since we introduced the save and return status pages which have the banner starting at the top of the page, making this look a little inconsistent.

Why not just hide the entire backbar on a single condition?
This would mean that the layout would jump in instances where the back button should be hidden (e.g. first card).

Before After
image image

@DafyddLlyr DafyddLlyr requested a review from a team November 18, 2023 09:43
@DafyddLlyr DafyddLlyr marked this pull request as ready for review November 18, 2023 09:43
Copy link

github-actions bot commented Nov 18, 2023

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr force-pushed the dp/remove-backbar-confirmation branch from 65a4f9e to 7d3c424 Compare November 18, 2023 11:18
Copy link
Contributor

@Mike-Heneghan Mike-Heneghan left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

One trivial question about the change to canGoBack but certainly not a blocker.

!hasPaid()
);
const { hasPaid, previousCard } = get();
return Boolean(node?.id) && Boolean(previousCard(node)) && !hasPaid();
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking Question:

Is it worth removing the check that the component is a Confirmation from the canGoBack? Part of me wonders if although the back is hidden in this new approach the canGoBack should maybe still be able to be a source of truth over whether it should be possible?

This is maybe silly and over defensive so please feel free to ignore.

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 it's a fair question - my first attempt did just rely on canGoBack().

However there are instances where we want the empty back bar in place for layout reasons, but canGoBack() would return a false - for example the first component in a flow. Without this the layout "jumps" a little which ends up being pretty noticable.

@DafyddLlyr DafyddLlyr merged commit 385970d into main Nov 28, 2023
10 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/remove-backbar-confirmation branch November 28, 2023 18:22
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