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

Basic style sidebar in Writer #10633

Merged
merged 10 commits into from
Dec 17, 2024
Merged

Conversation

eszkadev
Copy link
Contributor

@eszkadev eszkadev commented Nov 29, 2024

requires: https://gerrit.libreoffice.org/c/core/+/175646

Just a list of styles to apply for now...

styles

@eszkadev
Copy link
Contributor Author

eszkadev commented Dec 2, 2024

This is for RED. Preview only, for UX discussion

Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

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

Cool! I have playing with it already for some time (before the PR was made) well done :)

I think we briefly discuss this but let me try to emphasize here that I would strongly recommend to avoid new sidebars.

I would rather see: a "see all/expand" sort of a button added to the Home > Styles preview component; And a big button with a label added to the Format tab that would trigger the same Nonmodal dialog that can be moved around and close (not a sidebar)

Here is a draft look and feel (using existing button images, but of course we would use better ones)

image

Here ^ I have added:

  • Scroll button to go up
  • Scroll button to go down
  • The third button would open the new styles Nonmodal dialog (which all the styles as a list) . Here I use the same "more button" icon that we are already using elsewhere to signify "open dialog with more stuff"
    • This seems also to be the more familiar user pattern that users are used from MSO

Web dev tools changes:

#stylesview {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#stylesview-btn {
  border: 1px solid var(--color-stylesview-border);
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  height: 64px;
  margin-left: -5px;
}
#stylesview-btn .vertical {
  gap: 0;
}
#stylesview-btn button img {
  width: var(--btn-img-size-m) !important;
  height: var(--btn-img-size-m) !important;

  box-sizing: border-box;
}

#stylesview-btn button {
width: var(--btn-size-s) !important;
height: var(--btn-size-s) !important;
}

New #stylesview-btn added after #stylesview:

<div id="stylesview-btn" class="notebookbar" style="gap: 0;"><div id="" class="notebookbar vertical"><div class="unotoolbutton notebookbar ui-content unospan-home-brush unoFormatPaintbrush no-label" tabindex="-1" id="home-brush" data-cooltip="Clone Formatting"><button class="ui-content unobutton" id="home-brush-button" aria-label="Clone Formatting"><img class="" alt="Clone Formatting" src="http://localhost:9980/browser/48c008a2e9/images/lc_scrolltoprevious.svg"></button></div><div class="unotoolbutton notebookbar ui-content unospan-home-brush unoFormatPaintbrush no-label" tabindex="-1" id="home-brush" data-cooltip="Clone Formatting"><button class="ui-content unobutton" id="home-brush-button" aria-label="Clone Formatting"><img class="" alt="Clone Formatting" src="http://localhost:9980/browser/48c008a2e9/images/lc_scrolltonext.svg"></button></div><div class="unotoolbutton notebookbar ui-content unospan-home-brush unoFormatPaintbrush no-label" tabindex="-1" id="home-brush" data-cooltip="Clone Formatting"><button class="ui-content unobutton" id="home-brush-button" aria-label="Clone Formatting"><img class="" alt="Clone Formatting" src="http://localhost:9980/browser/48c008a2e9/images/lc_morebutton.svg"></button></div></div></div>

@eszkadev eszkadev force-pushed the private/eszkadev/basic-style-sidebar branch from 58b0c01 to 6f2a213 Compare December 17, 2024 10:01
@pedropintosilva pedropintosilva self-requested a review December 17, 2024 11:11
@eszkadev eszkadev dismissed pedropintosilva’s stale review December 17, 2024 11:17

let me address that later in followup, for now we don't have capacity to do all of that

@pedropintosilva
Copy link
Contributor

I missed your comment in GH: #10633 (review)
Unfortunately that sidebar allows to do more complex filtering of styles (hidden, used, etc) shows hierarchy of inheritance -> tree and allow to access table/frame (other types) than notebookbar widget - which shows only paragraph styles.

@eszkadev, I still think it should be placed both in the format tab (which answers your concern ^) and add it to the paragraph styles preview. The thing is that a new sidebar that no user outside some LO users know and adding to the number of sidebars we have, is - I'm afraid - an additional pain point in the overall UX. Plus a dialog would allow for moving it and look at the styles even if the window is quite narrow (and it's what is used in other traditional office software)

Reworking that to popup extending the notebookbar widget is bigger task. Can we just release "feature preview" now in CODE RED as sidebar?

@eszkadev, Sure, I understand. Just wanted to have that written as something we should really try to achieve in the future, as a follow up.

@eszkadev eszkadev force-pushed the private/eszkadev/basic-style-sidebar branch from 6f2a213 to 2f85618 Compare December 17, 2024 13:55
@eszkadev eszkadev enabled auto-merge (rebase) December 17, 2024 16:58
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8370b946a7d6fca6649bf3f890adec4983325302
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I89752283a0b89f66bc0ee6e68127a9d0082aeb74
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifb3daf81bfabfe644ca9c72126374cfce105ea9b
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1d59c722e40e83c9e76d95c39a78487688f9a98a
do not show bitmaps from core, use svgs instead

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib3fe0bc7c4192d25a5c9d2304005b051570d15a7
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I906a09ccfa7cdaf8ef296c480959417a887966f5
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ief9a600e37560c8887a57dec87de6391e7a9b2c3
we point it with parent id and entry text

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic233cba0944753ef46494d63c7bed7f1615f8074
@eszkadev eszkadev force-pushed the private/eszkadev/basic-style-sidebar branch from 587288d to 07abc05 Compare December 17, 2024 19:37
We will also add shortcut inside style previews widget

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iec2a3aaa1b96b709fa27161678ff94ce39755d21
if id is "0" it is still valid

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I52b5e69abfbf287d103fe5302c61ccbc33cfe2c6
@eszkadev eszkadev force-pushed the private/eszkadev/basic-style-sidebar branch from 07abc05 to 854b0b9 Compare December 17, 2024 21:30
@eszkadev eszkadev merged commit e6a58eb into master Dec 17, 2024
14 checks passed
@eszkadev eszkadev deleted the private/eszkadev/basic-style-sidebar branch December 17, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants