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

Shortcut guide v2 - WinUI3 body #156

Closed
enricogior opened this issue Sep 5, 2019 · 9 comments
Closed

Shortcut guide v2 - WinUI3 body #156

enricogior opened this issue Sep 5, 2019 · 9 comments
Labels
Product-Shortcut Guide Refers to the Shortcut Guide PowerToy

Comments

@enricogior
Copy link
Contributor

enricogior commented Sep 5, 2019

SVG support in D2D is lacking:

  • we need to use paths to render text
  • we cannot detect position of the rendered elements

Those make working with SVG a chore, especially placing dynamic elements. We should switch to software rendered content.

@enricogior enricogior added the Product-Shortcut Guide Refers to the Shortcut Guide PowerToy label Sep 5, 2019
@crutkas
Copy link
Member

crutkas commented Dec 9, 2019

i would like better understanding on this. SVG solves a lot of crispness and sizing issues.

@bzoz
Copy link
Contributor

bzoz commented Dec 16, 2019

There are a couple of issues with using SVG:

One is that Direct2D SVG support does not include <text> tags. We need to convert those to paths like in this 0.svg. This makes editing the labels hard.

Secondly, while the SVG is static, there are dynamic elements. We blink the key icons when the corresponding key is pressed. This requires that the key element in the SVG has a specific id - not a hard thing to do but one that requires some manual checking.

Secondly, we are scaling and transposing the SVG to fit various screen sizes and orientations, and there is no way to get the final location of the elements on the screen. This leads to some hackish code that finds the correct placement for WinKey + arrows tooltips.

On the other hand, rendering everything is ourselves is not hard, we already have some of the text elements dynamic. It would also allow us to have the list configurable (and also easy to localize). Since that would be a major rewrite, we wanted to combine that with switching to the Composition APIs.

@crutkas
Copy link
Member

crutkas commented Dec 16, 2019

I think we should come up with a game plan for v2 as this stuff should be localized and people want configuration ability here.

@enricogior
Copy link
Contributor Author

Moving away from SVG makes localization possible as for any other part of PowerToys that uses strings from resources.
For the Shortcut Guide localization there are extra steps since different localized versions have different keys, so it's not just a question of localizing the text, it will require to create maps to match the correct keys.

@bzoz
Copy link
Contributor

bzoz commented Dec 16, 2019

The keys could be stored with their descriptions in the resource file - e.g. [D] Display and hide the desktop would render the D as a key and the rest as a label.

@enricogior
Copy link
Contributor Author

We may consider it, but I'm not sure it's a best way to maintain the resource files, since each locale would have it's own values that are not strictly translations.

@crutkas
Copy link
Member

crutkas commented Feb 14, 2020

xref #890 for look/feel.

@crutkas crutkas added this to the 20.04 release milestone Feb 14, 2020
@crutkas
Copy link
Member

crutkas commented Feb 14, 2020

Note, this is so stuff is generated via a JSON file and create the UX, not stuff is user configurable. Configuration is future work

@enricogior enricogior removed this from the 20.04 release milestone Feb 27, 2020
@crutkas crutkas changed the title Replace SVG with software-generated content. Shortcut guide v2 Mar 26, 2020
@crutkas crutkas changed the title Shortcut guide v2 Shortcut guide v2 - WinUI3 body Mar 26, 2020
@crutkas crutkas added this to the v1.0 Release milestone Mar 26, 2020
@crutkas
Copy link
Member

crutkas commented Sep 18, 2020

closing this against #890

@crutkas crutkas closed this as completed Sep 18, 2020
stefansjfw pushed a commit that referenced this issue Dec 18, 2024
Resurrects the Pokedex extension I was working on before Luca was born.

This is a simple sample of a list with a _lot_ of items, and tags tags tags. It helps to repro a E_LAYOUT_CYCLE that we were seeing. 

This also fixes that layout cycle, by removing that unneeded `StackPanel`


Fixes #WaitItLooksLikeINeverFiledThis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Shortcut Guide Refers to the Shortcut Guide PowerToy
Projects
None yet
Development

No branches or pull requests

3 participants