Skip to content

Account height #2312

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 7 commits into from
Jul 30, 2023
Merged

Account height #2312

merged 7 commits into from
Jul 30, 2023

Conversation

sdivyanshu90
Copy link
Contributor

@sdivyanshu90 sdivyanshu90 commented Jul 18, 2023

Fixes :
When the High Contrast theme is enabled, a white space or box appears at the bottom of the page. This issue is caused by the height of the element.

Screenshot of the error:
image

Changes:

  • changes height to min-height

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@sdivyanshu90
Copy link
Contributor Author

Hi @raclim, could you please review my pull request? Thank you!

@lindapaiste
Copy link
Collaborator

Thanks for finding this issue! I see that it happens when the screen height is smaller than the height of the content. The part that you have to scroll down to see doesn't get the dark background.

I do kinda wonder why we are putting the background color on the .account-settings__container div and not on a higher-up element like the body or div id="root" but that's beyond the scope of this PR.

As far as fixing the issue, your change of width to min-width is perfect! The other changes are a bit more suspect. I'll leave comments on specific lines in a sec.

@@ -3,7 +3,7 @@
color: getThemifyVariable('primary-text-color');
background-color: getThemifyVariable('background-color');
}
height: 100%;
min-height: 100%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perfect ⭐

@@ -52,7 +52,7 @@

.form__input {
width: 100%;
min-width: #{360 / $base-font-size}rem;
min-width: 10%;
Copy link
Collaborator

@lindapaiste lindapaiste Jul 19, 2023

Choose a reason for hiding this comment

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

If the width is 100% then the min-width of 10% will never be used. The 10% will never be greater than the 100%. So this doesn't make a ton of sense. BUT....it actually is an improvement over what we have now! What you've discovered is that the current min-width: 360px (min-width: #{360 / $base-font-size}rem;) is not good as it causes horizontal overflow when the screen is narrower than ~390px.

Instead of changing it to min-width: 10%;, let's delete the existing line and replace it with nothing.

@@ -19,6 +19,7 @@
display: flex;
flex-direction: row;
justify-content: flex-end;
min-width: 10%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this line would come into play it all. Correct me if I'm wrong. I think you should delete this.

// margin-bottom: 0;
// }
// }

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's probably better to delete this than to add commented-out styles into the codebase.

@sdivyanshu90
Copy link
Contributor Author

Thank you for your review, @lindapaiste! I've implemented all the mentioned changes.

@sdivyanshu90 sdivyanshu90 requested a review from lindapaiste July 27, 2023 06:10
@lindapaiste lindapaiste added Area: Design For UI/UX design updates, proposals, or feedback Bug Error or unexpected behaviors labels Jul 28, 2023
@@ -52,7 +52,6 @@

.form__input {
width: 100%;
min-width: #{360 / $base-font-size}rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I gave you bad instructions here because I didn't realize that deleting this line will cause the inputs to be too narrow on large screens. 🤦‍♀️

Thinking this through...
Right now it is 360px wide always. This is a problem on small screens where 360px is too big. We want it to be 360px when possible but not too large to fit. The width: 100% alone doesn't do this because there is no width on the parent container (it will be too small on large screens). Doing a fixed width with max-width: 100% also doesn't work unless we also put a max-width on the container (it will overflow on small screens).

Option A - We put it back as it was before and merge this PR which fixes the background color issue.

Option B - The not perfect but very good fix.

.form__input {
  width: #{360 / $base-font-size}rem;
  max-width: 90vw;

The "perfect" fix would involve a max-width: 100%;, but that involves changing the CSS on a few ancestors and it becomes beyond the scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, thank you for the review. Right now, I will work on option B.

The "perfect" fix would involve a max-width: 100%;, but that involves changing the CSS on a few ancestors and it becomes beyond the scope of this PR.

Sure, I will work on the perfect fix, but not immediately. I will address it later.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Re: "perfect" fix, I actually have a CSS which I think is good but this didn't seem like the right PR for it.

.form__input {
  width: #{360 / $base-font-size}rem;
  max-width: 100%;
.form-container {
  max-width: 100vw;
  padding: #{20 / $base-font-size}rem;
.form-container__content {
  max-width: 100%;
  & > * {
    max-width: 100%;
  }

@sdivyanshu90 sdivyanshu90 requested a review from lindapaiste July 30, 2023 18:12
@lindapaiste lindapaiste merged commit c1b5636 into processing:develop Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Design For UI/UX design updates, proposals, or feedback Bug Error or unexpected behaviors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants