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

Fixed SignInUp Modal misalignment for devices smaller than 400px width #6386

Merged
merged 13 commits into from
Aug 7, 2024

Conversation

ehconitin
Copy link
Contributor

Hi @Bonapara,
Issue #6385

I encountered an issue with the Modal component where its width was fixed at 400px. While the container housing the Modal adjusted its size based on the screen width, the Modal itself remained at 400px regardless of the screen size.

I have implemented a change to address this problem. Could you please review the changes and let me know your thoughts?

Thank you!

2024-07-24.14-00-05.mp4

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

The pull request addresses the misalignment issue of the SignInUp Modal on devices with a width smaller than 400px by removing the fixed width constraint.

  • Removed fixed width: packages/twenty-front/src/modules/auth/components/Modal.tsx - Eliminated the hardcoded 400px width from the StyledContent styled component to enhance responsiveness.
  • Improved alignment: The modal now dynamically adjusts to fit smaller screen sizes, ensuring better user experience on devices under 400px width.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@ehconitin
Copy link
Contributor Author

@Bonapara
Addressed issue #5740

for devices width viewport less than 768px(mobile) will have onboarding screen fullscreened.
Btw I noticed one more bug, pricing screen does not go into dark mode.

2024-07-25.16-31-14.mp4
2024-07-25.16-37-18.mp4

@Bonapara
Copy link
Member

Hi @ehconitin, thanks so much for this PR. Do you think you can address the issue of pricing not switching to dark mode in the same PR?

@ehconitin
Copy link
Contributor Author

@Bonapara
I did look into it a bit.
I think that needs further digging.
I will get back to you if I figure it out.

@ehconitin
Copy link
Contributor Author

@Bonapara

I reviewed the issue again, and it appears the problem isn't with the pricing screen but with the signup page itself. When the mode is selected as light, the pricing page renders with the correct theme colors, indicating that the issue lies with the signup page.

Its the same with non mobile screens

Please refer to the video for more details.

2024-07-25.21-51-31.mp4

@ehconitin
Copy link
Contributor Author

@Bonapara
I made changes to ensure consistent theme management just like we discussed.
I would like to know if this a good approach, if yes I will cleanup the code a bit for merge.

@ehconitin
Copy link
Contributor Author

ehconitin commented Jul 31, 2024

I had a look at PR#5758

Creating variants should be easy.
Ill do that .
Right now the deletion modal on mobile screen goes fullscreen and not aligned.
Will fix it.

@ehconitin
Copy link
Contributor Author

Commited a temporay fix for modals.
This works.
But I think Modal overhaul is required.
It is being used in many places with atleast 3 different wrappers I could find in short time.

@ehconitin
Copy link
Contributor Author

ehconitin commented Aug 1, 2024

@FelixMalfait @Bonapara

I have created a new EnhancedModalLayout component that integrates the closable functionality, thereby consolidating the basic layout and closing properties into a single component. This change eliminates the need for two separate components, ModalLayout and Modal, for these functionalities.

Additionally, I introduced modalVariants as requested in this comment.

Could you please confirm if the spreadsheet-import modal needs to be hotkey-scoped? For now, I have added it. I have reviewed all modals to ensure the behavior is consistent, but please let me know if I missed anything.

Note: I have not deleted the old Modal component yet but it is redundant after this change. I will clean up the code after receiving your feedback.

@Bonapara
Copy link
Member

Bonapara commented Aug 1, 2024

@lucasbordeau, maybe you have some thoughts too!

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

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

Will be a nice improvement! I think I didn't fully get the intention/strategy behind that new component, hopefully we can clarify and merge this. Thanks (again and again!) for your work

@ehconitin
Copy link
Contributor Author

ehconitin commented Aug 7, 2024

@FelixMalfait

This is how the code would look after changes.
removed original ModalLayout and Modal, renamed EnhancedModalLayout to Modal
Could you please review once more :)
Please let me know if I missed something.

@@ -43,8 +43,6 @@ export const ModalWrapper = ({
<>
{isOpen && (
<StyledModal size="large" onClose={onClose} isClosable={true}>
{/*Remove onClose and isClosable if do not this compoenent key hotscoped */}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@FelixMalfait
I had a question regarding this import modal.
This was not initially hotscoped probably because accidental click outside while importing will close the modal
This comment is more of a question.
I forgot to raise this earlier.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the behavior seems acceptable like that to me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wait, so should be hotscoped or not?
I am sorry but Just want to confirm, cuz accidental touch might lead to loss of all that import steps user might be doing.
Presently it is hotscoped which it initially was not.

@FelixMalfait FelixMalfait merged commit c836bbb into twentyhq:main Aug 7, 2024
2 of 7 checks passed
Copy link

github-actions bot commented Aug 7, 2024

Thanks @ehconitin for your contribution!
This marks your 0th PR on the repo. You're top 0% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

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