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

Keep on top feature #6494

Closed
wants to merge 8 commits into from
Closed

Keep on top feature #6494

wants to merge 8 commits into from

Conversation

Chips1234
Copy link
Contributor

Summary of the Pull Request

Makes a button on the title bar to keep up on top of other windows. Calculator has a similar feature.
Please note, as of 06/13, the button design is finished but the code is not even started. This is a work in progress.

References

Connected to #3038.

PR Checklist

@ghost ghost added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. labels Jun 13, 2020
@Chips1234
Copy link
Contributor Author

Chips1234 commented Jun 13, 2020

For some reason, there are always commits unrelated to this PR. So, please ignore the commits from Apr 17th, to May 24th. Only beginning on 30 June 2020.

@Chips1234
Copy link
Contributor Author

Also, can someone help with the placement of the button? It looks good in the designer but it actually is placed on top of the "New Tab" split button

Copy link
Contributor

@AnuthaDev AnuthaDev left a comment

Choose a reason for hiding this comment

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

Add another columndefinition with width auto and change the column of minmaxclosecontrol to 3 and you should be good.

MinWidth="46.0"
Width="46.0"
Height="36"
Margin="220,0,0,0"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be removed. Generally you should not hardcode margins

UseLayoutRounding="True"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Grid.Row="2"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace it with Grid.Column="2"

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 14, 2020
@AnuthaDev
Copy link
Contributor

For some reason, there are always commits unrelated to this PR. So, please ignore the commits from Apr 17th, to May 24th. Only beginning on 30 June 2020.

Squash changes and force push :)

@AnuthaDev
Copy link
Contributor

AnuthaDev commented Jun 14, 2020

Also, this button should preferably be a part of the minmaxclosecontrol so it can reuse the styles and maybe even code

Nope, that control isn't necessarily always visible

@AnuthaDev
Copy link
Contributor

We might even want to make a separate control, so that (optional?) features like #5426 and #3038 can be implemented together

@Chips1234
Copy link
Contributor Author

Alright, thanks!

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 14, 2020
@Chips1234
Copy link
Contributor Author

We might even want to make a separate control, so that (optional?) features like #5426 and #3038 can be implemented together

Alright.

@Chips1234
Copy link
Contributor Author

If I set the value for the button for Grid.column="2" and for the MinMaxClose Grid.Column="3", the button overlaps the minimize one.

@zadjii-msft
Copy link
Member

Thanks for the effort! I think I'd prefer if we started by coming at this from another direction. I think it would be better to prove that we can get the Terminal to be set to "keep on top" mode first, then add the UI for enabling that setting. IMO, I'd rather this just be a setting that's enabled in the settings UI (#1564), or toggled with a keybinding/command, rather than have a dedicated button for it. So, if I were implementing this, I'd probably do it in the following steps:

  1. First prove that I can get the Terminal to stay on top of all windows.
  2. Then I'd add a setting to enable this fuctionality
  3. THen I'd make sure that the setting can be hot-reloaded, so the value can be turned on/off at runtime.
  4. If a follow-up PR, I'd add a ShortcutAction to manually toggle that setting.

@AnuthaDev
Copy link
Contributor

IMO, I'd rather this just be a setting that's enabled in the settings UI (#1564), or toggled with a keybinding/command, rather than have a dedicated button for it.

I would prefer it like the calculator with a dedicated button in titlebar to change always on top status along with a keyboard shortcut to toggle the always on top flag. IMHO, you should rather add a setting to set whether or not to show the "always on top" button in titlebar

@AnuthaDev
Copy link
Contributor

Also, it is interesting to think how this feature would interact with tab tearoff when it is implemented...

@zadjii-msft
Copy link
Member

Also, it is interesting to think how this feature would interact with tab tearoff when it is implemented...

That's exactly what my question was when this issue was first posted:

I suppose my next question would be: what happens when multiple applications want to be "always on top" - who wins?

and I'm not sure I've gotten a totally satisfactory answer to that question yet.


> I would prefer it like the calculator with a dedicated button in titlebar to change always on top status along with a keyboard shortcut to toggle the always on top flag. IMHO, you should rather add a setting to set whether or not to show the "always on top" button in titlebar

I've been highly reluctant to add more buttons to our already pretty minimalistic UI. It starts a slippery slope - "if this button is okay, then why can't I have a button dedicated to each profile"? I worry that adding more dedicated UI elements like this would leave the UI looking cluttered. Hence why I'm trying to drive the Command Palette (see #2046) for adding commands in a toggleable menu, and also why I'm driving to allow the user to add actions directly to the "New Tab Button dropdown" (see spec in-progress #5888). That seems like a much better place to stash this button, if the user so chooses. Hence my push to have this be a ShortcutAction the user can toggle 😉.

@WSLUser
Copy link
Contributor

WSLUser commented Jun 15, 2020

I just did some playing around using the Keep on Top feature in Calculator. I'll be honest, I'm not a huge fan of it. There's an ugly button right next to the Calculator Mode title and it always goes to the right. I actually prefer having it done exactly as zadjii-msft requests. Another thing to think about in regards to that ShortcutAction: how will that play into Quake Mode? Will we be able to instantly place Terminal on top (toggable setting) when we launch it?

@AnuthaDev
Copy link
Contributor

Also, should there be a maximum size limit in AOT mode?...

@ZhaoMJ
Copy link
Contributor

ZhaoMJ commented Jun 22, 2020

Given PowerToys has a prototype of "always on top" tool, we might not need to implement it by ourselves. So we can keep our UI minimalistic. I also think they can figure out a solution for cases like multiple windows.

@WSLUser
Copy link
Contributor

WSLUser commented Jul 6, 2020

In some world where somebody chooses to use Windows Terminal but not Power Toys, we'd need this feature available as an option that defaults to false. I am a bit worried about conflicts between trying to use the same feature via both Terminal settings and PowerToys but I think that's simply a doc update that recommends users not to enable it in both but one or the other.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 6, 2020
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jul 13, 2020
@ghost
Copy link

ghost commented Jul 13, 2020

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

@zadjii-msft
Copy link
Member

Thanks for the contribution! Since this PR seems to be a bit stale now, we're going to close this in favor of #6903. Thanks!

@ghost ghost removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jul 13, 2020
@Chips1234
Copy link
Contributor Author

Chips1234 commented Jul 13, 2020 via email

@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Always On Top
5 participants