Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Improved handling for long words (#155) #171

Merged

Conversation

vanwykjd
Copy link
Contributor

@vanwykjd vanwykjd commented Nov 9, 2018

Associated Issue: #155

Summary of Changes

  • Width of character input-columns responds to varying word lengths

@ollelauribostrom
Copy link
Owner

@vanwykjd Nice, I'll have a look at this when i get some free time this week 🙂

@coveralls
Copy link

coveralls commented Nov 13, 2018

Pull Request Test Coverage Report for Build 409

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.617%

Totals Coverage Status
Change from base Build 407: 0.0%
Covered Lines: 154
Relevant Lines: 175

💛 - Coveralls

Copy link
Owner

@ollelauribostrom ollelauribostrom left a comment

Choose a reason for hiding this comment

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

I've looked at your changes and they are working pretty nicely. However, I think that we can achieve the same effect just by doing some simple css changes 🙂

Have a look at the following css changes/additions:

.word {
  /* Use flex instead of grid */
  display: flex;
}

.word__char {
  /* Add the width property */
  width: 50px;
}

@vanwykjd
Copy link
Contributor Author

@ollelauribostrom Thanks for looking into my changes and I appreciate your feedback! This isn't the first time I've been guilty of over-analyzing a situation...

As you mentioned, I agree that some simple CSS changes should do the trick, and will look into making those changes tomorrow.

@vanwykjd vanwykjd force-pushed the responsive-design-lw branch from 240b576 to 3d9a0bf Compare November 20, 2018 20:38
Copy link
Owner

@ollelauribostrom ollelauribostrom left a comment

Choose a reason for hiding this comment

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

For now I think we don't want to introduce to much change to the mobile appearance. It would be sufficient to just add the following css to the existing mobile/tablet media queries:

  .word {
    display: grid;
    grid-template-columns: repeat(auto-fit, 50px);
  }
  .word__char {
    width: auto;
  }

@vanwykjd
Copy link
Contributor Author

vanwykjd commented Nov 28, 2018

@ollelauribostrom I had a feeling the added breakpoints may have been a little much... I tend to get caught up it in the details once I've envisioned something.

I changed back to original the media queries and made the adjustments as suggested, but the appearance of the long words revert back to the original issue: (for the mobile devices)

screen shot 2018-11-28 at 1 22 14 pm

My question is whether or not the improvements requested for this issue (#155) regards all devices or just the large, and have the improvements be addressed for the mobile devices in issue #152?

@ollelauribostrom
Copy link
Owner

I think for #155 we can just focus on making this look nice on desktops and keep the original style for mobile devices. Not sure on how the best way would be to solve this on mobile devices but we can look at that in #152 🙂

@vanwykjd vanwykjd force-pushed the responsive-design-lw branch from 3d9a0bf to c427216 Compare November 30, 2018 23:06
Copy link
Owner

@ollelauribostrom ollelauribostrom left a comment

Choose a reason for hiding this comment

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

Nice, I commented on some minor stuff that needs to be fixed before merging this 🙂

src/css/main.css Outdated
}

.word__char {
height: 50px;
width: 100%;
Copy link
Owner

Choose a reason for hiding this comment

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

You can just use width: 50px (no need for the max-width property as far as I understand 🙂 )

src/css/main.css Outdated
}

.word__char {
height: 50px;
width: 100%;
max-width: 50px;
margin: auto 0;
Copy link
Owner

Choose a reason for hiding this comment

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

No need for this margin property

src/css/main.css Outdated
@@ -162,7 +165,6 @@ body,
grid-column-start: 1;
grid-column-end: 6;
border: none;
background: #9c0629;
Copy link
Owner

Choose a reason for hiding this comment

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

This should not be removed since it fixes the progress-bar appearance in FF

@vanwykjd vanwykjd force-pushed the responsive-design-lw branch from 57c4a62 to ae56310 Compare December 3, 2018 17:15
@ollelauribostrom
Copy link
Owner

Nice, thanks a lot 👍

@ollelauribostrom ollelauribostrom merged commit bfe232a into ollelauribostrom:master Dec 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants