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

Allow Title Bar to be Hidden (closes #13249)#21234

Merged
sadick254 merged 23 commits intoatom:masterfrom
TheDrawingCoder-Gamer:master
Sep 7, 2020
Merged

Allow Title Bar to be Hidden (closes #13249)#21234
sadick254 merged 23 commits intoatom:masterfrom
TheDrawingCoder-Gamer:master

Conversation

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor

@TheDrawingCoder-Gamer TheDrawingCoder-Gamer commented Aug 30, 2020

Requirements for Adding, Changing, or Removing a Feature

Issue or RFC Endorsed by Atom's Maintainers

See #13249

Description of the Change

This opens the already available option on macOS to hide the title bar to Windows and Linux. This requires little work and makes it much easier for packages like atom-title-bar-replacer to work. Note only the hidden and native options are exposed.

Alternate Designs

Editing the source code like atom-title-bar-replacer does. This is undesirable as source editing is dangerous and unstable

Possible Drawbacks

The title bar being hidden might make it hard to close the window.

Verification Process

Toggling the title bar on and off seems to cause no issues.

Release Notes

Allows Hiding of Title Bar on all platforms

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

It seems the linter isn't working. Any help would be appreciated!

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

This closes #13249

@DanielTamkin
Copy link
Copy Markdown

Oh this is so exciting @TheDrawingCoder-Gamer!

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

It seems that the specs aren't working. Please help with specs so we can hammer this out!

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

Please help me unbork this

@DanielTamkin
Copy link
Copy Markdown

I'm pretty limited in my knowledge about the backend of Atom, but i'm sure i could find some time soon to learn a bit of it. Might be able to to give you a hand @TheDrawingCoder-Gamer. Is the linter failing and that's it?

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

No, some more is borked. Some things in the text editor in spec are failing. Run specs, mostly specs are borked

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 2, 2020

Hi @TheDrawingCoder-Gamer, fellow Atom hackerizer from the community here.

I'd like to point out that some tests fail by timing out in the CI environment. They often fail even for "correct" code, and pass when allowed to re-run several times. Are you certain that the specs are truly broken? Maybe they just need a chance to re-run.

Also, NSlog builds okay for me on master branch. It does have native code in it, so you have to be somewhat careful to build it cleanly. You can make sure everything is built cleanly by doing script/clean then script/bootstrap and finally script/build --no-bootstrap, though that does take a while.

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 2, 2020

There are a fair amount of changes here that don't look 100% related to the main purpose of this PR. You can revert them one file at a time by doing the following:

(For any version of git): git checkout c79d2adbe0c8902e87624049982a31fd7e4c3ebe -- path/to/file

(For git 2.25 or newer): git restore --source="c79d2adbe0c8902e87624049982a31fd7e4c3ebe" -- path/to/file. For example: git restore --source="c79d2adbe0c8902e87624049982a31fd7e4c3ebe" -- apm/package-lock.json

You can list multiple paths/to/files, and/or paths/to/folders after the -- to do multiple files at once.

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

I'm using GitHub Desktop and revert commit seems to be working well. I wish I had made more commits or I wouldn't have to be unstaging hunks.

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

I'm sure some tests are messed up because there are number mismatches, and the like.

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

I think this would actually pass but there is a timeout

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

Can I force the check to rerun or does a mod have to

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 3, 2020

Yeah, it's possible this would pass if re-run. You can set up a (free) Azure DevOps account if you want to run the CI yourself. (I already have an account set up, so I could run it for you on my account, and post a link to the results if that would help, to see if it passes. Would not make this PR show as "passing", though.)

Details

I see there are a couple of timeouts on Windows x64, which isn't really that uncommon at this repo. CI timeouts on genuinely working code tend to happen on Windows x64, or one of the three macOS test runners. (It's a problem that's being looked at and worked on, but the cause isn't obvious, so the solution isn't obvious either.)

https://github.visualstudio.com/Atom/_build/results?buildId=80338&view=logs&j=4fbced83-508e-5fe0-c978-5c71ec0fc506&t=b7851fd1-a7b6-5bbd-e24e-1d32b43df7d7&l=2433

Can I force the check to rerun or does a mod have to

I'm pretty sure one of Atom's maintainers would have to do it, for the CI attached to this PR. Anyone can clone your branch and run CI on it from their own Azure DevOps account, though. (That takes a bit of setup time, I'll admit).

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 6, 2020

I suppose that's fine, as long as it works. (I shouldn't really answer that, since it's the Atom maintainers' repo, so it would be down to their preferences. But looking at past PRs, things like that have been merged.)

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

Running git diff c79d2adbe0c8902e87624049982a31fd7e4c3ebe --ignore-cr-at-eol -- . doesn't include words.js so

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 6, 2020

I tried this from Windows and nothing I tried worked. I was able to fix it from a Linux computer, though.

DeeDeeG@41eb5a5

I can open a pull request to your branch over at your fork of Atom if you'd like?

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

Yes please I am getting frustrated over this file

spec/helpers/words.js: Restore line endings
@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 6, 2020

It looks like the changes to that file are resolved now.

@TheDrawingCoder-Gamer Sorry about all the frustration.

Usually I try to help people learn the git commands (that old saying about "teach the person to fish rather than give them the fish"). But in this case I don't know if this was possible to fix on Windows at all. So there was no point trying to walk you or anyone through the process. If I had known that I would have offered to open a PR sooner.

Edit/Update: I think I've got this figured out now? The following should have worked, and I'm able to reproduce it reliably working on Windows now:

> git checkout c79d2adbe0c8902e87624049982a31fd7e4c3ebe -- spec/helpers/words.js
> git status # This should show that spec/helpers/words.js is modified and ready to be committed
> git diff --staged --stat #  This should show spec/helpers/words.js was changed with a large (equal) amount of added/removed lines
> git commit -m "some commit message"

OR:

> git restore --staged --source=c79d2adbe0c8902e87624049982a31fd7e4c3ebe -- spec/helpers/words.js # Note the "--staged" flag!
> git status # This should show that spec/helpers/words.js is modified and ready to be committed
> git diff --staged --stat #  This should show spec/helpers/words.js was changed with a large (equal) amount of added/removed lines
> git commit -m "some commit message"

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

It is more helpful to learn than be given, but I never knew that this could be unfixable. We're in the home stretch now, and it's probably gonna be included. Thank you for helping with this PR!

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

Linux failed 3 times

@sadick254
Copy link
Copy Markdown
Contributor

@TheDrawingCoder-Gamer The linux failures are unrelated to this PR and we are trying to figure out why its failing atom/apm#900. Thank you for your contribution. Looking forward to review more PR's from you 😄

@TheDrawingCoder-Gamer
Copy link
Copy Markdown
Contributor Author

https://dev.azure.com/benharless820/benharless820/_build/results?buildId=10&view=results Success!

@sadick254 sadick254 merged commit 10dfeb8 into atom:master Sep 7, 2020
@tonglei100
Copy link
Copy Markdown

How to hidden the title bar? I'm use the 1.53.0 on Windows 10

@ThatXliner
Copy link
Copy Markdown
Contributor

ThatXliner commented Jan 4, 2021

How to hidden the title bar? I'm use the 1.53.0 on Windows 10

On a Mac, you can go to core > title bar in the settings and edit it from there

@tonglei100
Copy link
Copy Markdown

tonglei100 commented Jan 4, 2021

How to hidden the title bar? I'm use the 1.53.0 on Windows 10

On a Mac, you can go to core > title bar in the settings and edit it from there

Thank you! on Windows 10 it's OK too

But when I hidden the title bar and menu, I cann't show the menu. Now how can I do to use the menu?

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Jan 4, 2021

@tonglei100

But when I hidden the title bar and menu, I can't show the menu. Now how can I do to use the menu?

When this setting is enabled, Atom's built-in menu goes away. You can still visit settings by pressing Ctrl + ,.

This is meant to be used with something that provides a custom title bar, like this: https://atom.io/packages/title-bar-replacer (I'm sure there are other packages like available as well.)

@tonglei100
Copy link
Copy Markdown

@tonglei100

But when I hidden the title bar and menu, I can't show the menu. Now how can I do to use the menu?

When this setting is enabled, Atom's built-in menu goes away. You can still visit settings by pressing Ctrl + ,.

This is meant to be used with something that provides a custom title bar, like this: https://atom.io/packages/title-bar-replacer (I'm sure there are other packages like available as well.)

title-bar-replacer is very good! thank u

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants