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

Add Switcher modal #5089

Merged
merged 4 commits into from
Nov 23, 2020
Merged

Add Switcher modal #5089

merged 4 commits into from
Nov 23, 2020

Conversation

saqimtiaz
Copy link
Member

@saqimtiaz saqimtiaz commented Nov 22, 2020

This is an alternative take on #5003

tm-show-switcher accepts a parameter switch which determines which switcher to show. Possible values are "theme", "palette", "language" and "layout".

The keyboard shortcut Ctrl+Shift+L is configured for the layout switcher.

A quick take on a CSS class for centered modals has been added and used. Our options here are somewhat limited by the JavaScript controlled animations and properties.

Demo

image

@saqimtiaz
Copy link
Member Author

@BurningTreeC This builds on your work. It was just easier to code it than explain the approach.
Would love your input on the CSS, especially the transitions.

@BurningTreeC
Copy link
Contributor

@saqimtiaz , I understand your approach and I like it!

About the transition: Removing it does not change anything, I doubt that it has any effect

@BurningTreeC
Copy link
Contributor

I propose making the keyboard shortcut ctrl-shift-L because alt-shift-L is already taken for linkify in the text editor, which can cause confusion

@saqimtiaz
Copy link
Member Author

Keyboard shortcut changed to Ctrl+shift+L and CSS line for animation removed. Demo updated.

@saqimtiaz
Copy link
Member Author

@Jermolene I believe this meets your specs for how the switcher should be.

Should we decide not to have this in 5.1.23 for any reason, I suggest we at least add a simple switcher to the Control Panel.

Copy link
Member

@Jermolene Jermolene left a comment

Choose a reason for hiding this comment

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

Thanks @saqimtiaz looks good, just a couple of minor wording issues

core/language/en-GB/Misc.multids Outdated Show resolved Hide resolved
core/language/en-GB/Misc.multids Outdated Show resolved Hide resolved
core/ui/Switcher.tid Outdated Show resolved Hide resolved
@saqimtiaz
Copy link
Member Author

All good suggestions @Jermolene and now resolved.

image

@Jermolene
Copy link
Member

Thanks @saqimtiaz

@Jermolene Jermolene merged commit aa6f152 into TiddlyWiki:master Nov 23, 2020
@saqimtiaz
Copy link
Member Author

@Jermolene any thoughts on where to document the shortcut Ctrl+Shift+L for the switcher?

Considering that it's intended to be a way to resolve a potentially broken layout we need to make sure it is an easy to discover shortcut.

@Jermolene
Copy link
Member

Hi @saqimtiaz in the first instance, I think we need some docs under "Customise TiddlyWiki" in the TOC talking about layout switching, both from the perspective of an end user and for people creating new layouts. But longer term, I'm really interested in the idea of a context sensitive "heads up display". (We can figure out the keyboard shortcuts prevailing for a DOM node by walking up the widget tree)

@saqimtiaz
Copy link
Member Author

@Jermolene HUD idea is great, we have a ticket to work on it after 5.1.23: #4958

I'll work on some docs for the layout switching.

@kookma
Copy link
Contributor

kookma commented Nov 23, 2020

@saqimtiaz

Seems the $:/snippets/LayoutSwitcher needs a caption

image

Why is the name of tiddler prefixed with $:/snippets/?

@saqimtiaz
Copy link
Member Author

@kookma good catch, I was focused on the modal and not the ControlPanel.

@BurningTreeC would you have time to add the missing caption? I'm a bit pressed for time this evening.

@BurningTreeC
Copy link
Contributor

yes @saqimtiaz , I'll add a caption. "Layout Switcher" should be good

@saqimtiaz
Copy link
Member Author

@BurningTreeC I think in this case we just need the caption "Layout". See the screenshot from @kookma above.

Thank you, much appreciated.

@saqimtiaz saqimtiaz deleted the switcher branch November 24, 2020 09:18
@kookma
Copy link
Contributor

kookma commented Nov 25, 2020

Hi @Jermolene
Is it possible to have at least one other page layout in Tiddlywiki 5.1.23
Do you think solo can be used here?

@Jermolene
Copy link
Member

Hi @kookma I don't think we have any candidate layouts of a sufficient quality at this point; part of the problem is that any layout that goes into the core has to be permanent. The idea of including the layout switcher in v5.1.23 is to give an opportunity for plugin writers to be able to get to work on new layouts.

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.

None yet

4 participants