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

Refactor top-app-bar into top-app-bar, top-app-bar-fixed, and top-app… #379

Merged
merged 13 commits into from Aug 22, 2019

Conversation

dfreedm
Copy link
Collaborator

@dfreedm dfreedm commented Aug 16, 2019

…-bar-short

  • Remove fixed and short options from mwc-top-app-bar
  • remove centerTitle from mwc-top-app-bar
  • mwc-top-app-bar README
  • mwc-top-app-bar-fixed
  • mwc-top-app-bar-fixed README
  • mwc-top-app-bar-short
  • mwc-top-app-bar-short README
  • fix tests
  • update CHANGELOG

Fixes #329
Fixes #351

…-bar-short

- [x] Remove fixed and short options from mwc-top-app-bar
- [x] remove `centerTitle` from mwc-top-app-bar
- [x] mwc-top-app-bar README
- [ ] mwc-top-app-bar-fixed
- [ ] mwc-top-app-bar-fixed README
- [ ] mwc-top-app-bar-short
- [ ] mwc-top-app-bar-short README
@dfreedm dfreedm marked this pull request as ready for review August 20, 2019 03:58
@dfreedm
Copy link
Collaborator Author

dfreedm commented Aug 20, 2019

Cheating a bit by forking the foundation change I made in material-components/material-components-web#5009, but it was the only good way to fix the scrolling bug with the short component.

packages/top-app-bar-short/README.md Show resolved Hide resolved
packages/top-app-bar-short/README.md Outdated Show resolved Hide resolved
packages/top-app-bar-short/README.md Outdated Show resolved Hide resolved
packages/base/src/utils.ts Outdated Show resolved Hide resolved
packages/base/src/utils.ts Outdated Show resolved Hide resolved
packages/top-app-bar/src/mwc-top-app-bar-base-base.ts Outdated Show resolved Hide resolved
packages/top-app-bar-fixed/README.md Outdated Show resolved Hide resolved
packages/top-app-bar-short/README.md Outdated Show resolved Hide resolved
packages/top-app-bar/README.md Outdated Show resolved Hide resolved
*/

/* NOTE: Delete this after
* https://github.com/material-components/material-components-web/pull/5009
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this MDC PR was approved, so can probably remove before merging this PR? I guess we'd need a release though, what's the MDC release schedule?

Copy link
Member

@e111077 e111077 left a comment

Choose a reason for hiding this comment

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

LGTM on my comments.


### Prominent and Dense

<img src="images/prominent_and_dense.png" height="96px">
Copy link
Collaborator

Choose a reason for hiding this comment

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

The title cuts off in this screenshot.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I can remove the Fixed part from these, and that should fix it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


Fixed Top App Bars are a container for items such as application title, navigation icon, and action items that are always visible.

![](images/fixed.gif)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The gifs are awesome, exactly what's needed to show the difference between the three layouts. I can't help myself notice these nits though...

  • It looks very blurry on my retina screen (whereas the other screenshots below it look perfect). Was it recorded on a low dpi screen?
  • I think it'd look better without the mouse cursor visible (put the mouse lower down so it's not in the crop?)
  • I think it'd look better if the text was left padded, and probably a lower font weight (e.g. like in this screenshot from the spec?)

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Didn't change the font weight, but a 16px padding left and right looks a lot better.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks better! Still looks blurry though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, this is only looking blurry on a high DPI display. I think the tool I'm using is just not capturing at 2x? Or maybe this is as good as I can get from it.

There are alternate options, but maybe this is acceptable for now and I can look into improving the gif quality in the future?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah looks like licecap might be bad at doing high dpi: justinfrankel/licecap#9. Ok, if you don't want to spend more time on it, your call.

Copy link
Collaborator

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

LGTM, I guess file issues for fixing the gif, and for deleting the forked foundation once MDC releases?

@dfreedm dfreedm mentioned this pull request Aug 22, 2019
@dfreedm
Copy link
Collaborator Author

dfreedm commented Aug 22, 2019

LGTM, I guess file issues for fixing the gif, and for deleting the forked foundation once MDC releases?

Filed #411 and #410 to track

@dfreedm dfreedm merged commit 3d02c80 into master Aug 22, 2019
@dfreedm dfreedm deleted the refactor-top-app-bar branch August 22, 2019 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<mwc-top-app-bar> needs a way to set background color <mwc-top-app-bar> needs a way to pad content below
4 participants