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: last acc hidden in switch acc list, closes #5975 #5987

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

alter-eggo
Copy link
Contributor

@alter-eggo alter-eggo commented Nov 22, 2024

Try out Leather build 2945c8dExtension build, Test report, Storybook, Chromatic

This pr fixes last acc hidden in switch acc sheet and in choose acc flow

Copy link
Collaborator

@kyranjamie kyranjamie left a comment

Choose a reason for hiding this comment

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

Approved as these decisions were prior to your PR, but some of these hard coded values don't look like the way to do it

@@ -20,7 +20,7 @@ export function VirtuosoWrapper({ children, hasFooter, isPopup }: VirtuosoWrappe
const [key, setKey] = useState(0);
const isAtLeastMd = useViewportMinWidth('md');
const virtualHeight = isAtLeastMd ? '70vh' : '100vh';
const headerHeight = isPopup ? 230 : 60;
const headerHeight = isPopup ? 300 : 80;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like a bad choice to me that the core virtuoso component has these hard coded header/footer heights.

What if i use the component again with a different footer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to start huge refactoring here

Copy link
Contributor

Choose a reason for hiding this comment

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

This code isn't ideal but we have had this issue for a long time and this was the simplest fix. We only use this 3 times and twice with a footer.

We could refactor to pass the values in but I think it's OK

Comment on lines 86 to 90
<HStack alignItems="center">
<PlusIcon />
Generate new account
<styled.span textStyle="label.02">Generate new account</styled.span>
</HStack>
{component}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the container just be changed such that the height of the list stops when it gets to the button, and doesn't go under it?

Copy link
Contributor

@pete-watters pete-watters left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @alter-eggo 👍

I'm almost certain it was fixed before so sad to see it re-appear but glad you sorted it

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.

3 participants