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

feat: add topbar title #21

Merged
merged 4 commits into from
Jun 10, 2020
Merged

feat: add topbar title #21

merged 4 commits into from
Jun 10, 2020

Conversation

AndersDJohnson
Copy link
Contributor

@AndersDJohnson AndersDJohnson commented Apr 9, 2020

Adds support for optional topbar titles using CSS content. Add topbarTitle prop (didn't use title since it becomes the HTML title attribute).

Also switching the units from em to rem since otherwise things might not line up (especially with #22) since a different font is applied to the topbar vs. the content which inherits from the document.

Here it is for all three versions (Terminal, MacTerminal, Browser):

Screen Shot 2020-04-08 at 8 39 58 PM

Fixes #20.

src/index.js Outdated
Comment on lines 37 to 44
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 1;
border-top-left-radius: 0.4em;
border-top-right-radius: 0.4em;
background-clip: padding-box;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lines 37-44 were just re-indented - see whitespace insensitive diff: https://github.com/coston/react-window-ui/pull/21/files?diff=split&w=1

border-top-left-radius: 0.4em;
border-top-right-radius: 0.4em;
background-clip: padding-box;
font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif, "Apple Color Emoji";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the system font stack from https://css-tricks.com/snippets/css/system-font-stack/ but only the Mac ones.

@Darrekt
Copy link

Darrekt commented Jun 8, 2020

Would really love to see this feature in!

@coston
Copy link
Owner

coston commented Jun 9, 2020

@Darrekt @AndersDJohnson Hey y'all! I'm sorry for the delay. This slipped my radar. This is a great enhancement of the component. 🙌

Improvements that I think should be made based on the screenshot:

  • The buttons should be vertically centered in the top bar (e.g. browser buttons)
  • Verify the font size compared to native windows

Please look into the details above, if you have capacity.

A personal blocker is that this PR is hard to quickly inspect, as I have little capacity myself. I am going to drop in a dedicated demo site within the next few days. I will merge this feature by the end of the week.

@coston
Copy link
Owner

coston commented Jun 10, 2020

@AndersDJohnson @Darrekt this seems to work well. None of the spacing issues seen in the PR screenshot. Great job, @AndersDJohnson 🎉

image

@coston coston merged commit 08dc496 into coston:master Jun 10, 2020
@coston
Copy link
Owner

coston commented Jun 10, 2020

This was published at react-window-ui@2.2.0

@AndersDJohnson
Copy link
Contributor Author

Thanks much, @coston! 💯 I understand the struggle of maintaining small open source packages and feature requests from random people... 😅

@AndersDJohnson AndersDJohnson deleted the titles branch June 10, 2020 23:43
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.

feat: support custom window title
3 participants