Bug 95885 - CALC: Add new toolbar and toggle icons for Cell Protection
Summary: CALC: Add new toolbar and toggle icons for Cell Protection
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Gülşah Köse
QA Contact:
URL:
Whiteboard: target:5.4.0 target:5.4.0.1
Keywords:
Depends on:
Blocks: Calc-Toolbars UNO-Command
  Show dependency treegraph
 
Reported: 2015-11-17 20:20 UTC by Timur
Modified: 2017-06-02 12:26 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2015-11-17 20:20:25 UTC
To change cell protection, we need to go to Format-Cells-Cell Protection.
It would be nice to have toggle icons for this, let's say in the form of Cell Protection toolbar where we can turn on icons we need (such as Protected), of course initially not visible.
If UNO commands are also needed, please advise whether new bug need to be created for that, or this one i sufficient for all.
Comment 1 Buovjaga 2015-11-18 08:20:41 UTC
Hello, UX: this one is for you.
Comment 2 Timur 2016-01-12 16:12:09 UTC Comment hidden (obsolete)
Comment 3 Gülşah Köse 2016-01-12 16:35:45 UTC
(In reply to Timur from comment #0)
> To change cell protection, we need to go to Format-Cells-Cell Protection.
> 

Hi Timur. I couldn't find Cell protection from that path. I'm using LibreOfficeDev 5.2.0.0.alpha0
Comment 4 Buovjaga 2016-01-12 17:01:00 UTC
(In reply to Gülşah Köse from comment #3)
> (In reply to Timur from comment #0)
> > To change cell protection, we need to go to Format-Cells-Cell Protection.
> > 
> 
> Hi Timur. I couldn't find Cell protection from that path. I'm using
> LibreOfficeDev 5.2.0.0.alpha0

I do. Also from Right-click - Format cells - Cell prot.
Or Ctrl-1 to open the Format cells dialog.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 813a319fe836d1ed1c967928bc044643d0b4c07d
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-12_07:46:53
Locale: fi-FI (fi_FI)
Comment 5 Buovjaga 2016-01-12 17:01:37 UTC
This is in Calc.
Comment 6 Heiko Tietze 2016-01-12 17:10:29 UTC
Sorry for the delay, Timur. 
It's always hard to say if a feature is important enough in terms of being frequently used that it is worth to get an own menu entry or toolbar button. Of course it would be nice to have at least an UNO command for this property in order to self-configure it into the toolbar. And maybe it should be added to the menu, for example below Protect Sheet. 
But what you can do right now is to define a style with or without protection. That makes it possible to switch quickly between on or off.

@Gülşah: Format > Cells... (or ctrl+1) > tab "Cell Protection" > checkbox "Protected" (Version: 5.1.0.0.alpha1+ not really up-to-date admittedly)
Comment 7 Gülşah Köse 2016-01-12 21:30:26 UTC
> @Gülşah: Format > Cells... (or ctrl+1) > tab "Cell Protection" > checkbox
> "Protected" (Version: 5.1.0.0.alpha1+ not really up-to-date admittedly)

Sorry, Because of this bug (https://bugs.documentfoundation.org/show_bug.cgi?id=92776) i couldn't read tabs text. No i found it.

If it is needed feature, i want to work on it.
Comment 8 Timur 2016-01-14 08:13:14 UTC
(In reply to Heiko Tietze from comment #6)
> Of course it would be nice to have at least an UNO command for this property
> in order to self-configure it into the toolbar. And maybe it should be added
> to the menu, for example below Protect Sheet. 
Can you please confirm the bug? Or anyone can do it?
Is a new bug needed, or this one is sufficient for UNO command as well?

(In reply to Gülşah Köse from comment #7)
> If it is needed feature, i want to work on it.
I think UNO is needed and toolbar button would be welcome.
Comment 9 Heiko Tietze 2016-01-14 10:26:30 UTC
I do not want to change any ticket based on only one opinion. So I asked bubli on IRC and she also thinks that having UNO:ToggleCellProtection would be a good enhancement.
Comment 10 Timur 2017-03-10 18:49:10 UTC
(In reply to Gülşah Köse from comment #7)
> If it is needed feature, i want to work on it.
You are welcome, if still interested.
Comment 11 Gülşah Köse 2017-03-15 13:18:06 UTC
Almost finished. Need some help about
1- Which image should be used for toolbar button?
2- @Maxim Toggle behaviour needs improvement. It works (notifies button for last state) when double click to a cell. But one click to cell doesn't notify to button? How can i implement it?
Comment 12 Gülşah Köse 2017-03-15 13:19:00 UTC
https://gerrit.libreoffice.org/#/c/35218/
Comment 13 Heiko Tietze 2017-03-15 14:47:50 UTC
(In reply to Gülşah Köse from comment #11)
> 1- Which image should be used for toolbar button?

Ideally a lock similar to protect sheet but with a small decoration to show that it's about cell protection, plus an open version of course.
Comment 14 Gülşah Köse 2017-03-16 12:41:18 UTC
(In reply to Heiko Tietze from comment #13)
> (In reply to Gülşah Köse from comment #11)
> > 1- Which image should be used for toolbar button?
> 
> Ideally a lock similar to protect sheet but with a small decoration to show
> that it's about cell protection, plus an open version of course.

I created an image for breeze theme. https://gerrit.libreoffice.org/#/c/35218/ Is it OK?

And Toggle issue is solved.
Comment 15 Heiko Tietze 2017-03-16 12:48:45 UTC
(In reply to Gülşah Köse from comment #14)
> I created an image for breeze theme.
> https://gerrit.libreoffice.org/#/c/35218/ Is it OK?

Let's ask the master of Breeze...
Comment 16 andreas_k 2017-03-16 13:11:54 UTC
Will check in the evening ordinary there should be some lock icons available.
Comment 17 Gülşah Köse 2017-03-16 21:10:38 UTC
(In reply to andreas_k from comment #16)
> Will check in the evening ordinary there should be some lock icons available.

Out of sight, i found it now. I used unsetcellsreadonly.png

Icon issue is ok now.
Comment 18 Timur 2017-03-29 14:38:22 UTC
Just to keep momentum, should Gulsah work more "to create a dedicated slot for the toggle behavior" if possible, or this can be solved like this "using a toolbar controller" for the moment, and left for some future improvement?
Comment 19 Gülşah Köse 2017-03-31 08:41:47 UTC
(In reply to Timur from comment #18)
> Just to keep momentum, should Gulsah work more "to create a dedicated slot
> for the toggle behavior" if possible, or this can be solved like this "using
> a toolbar controller" for the moment, and left for some future improvement?

Timur, I just saw Maxim's answer. I can reimplement it with new slot without toolbar controller.
Comment 20 Commit Notification 2017-05-04 22:15:35 UTC
Gulsah Kose committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9691f2652f157f375881aea3bf5e39d72a133e0f

tdf#95885 Add new toolbar and toggle icons for Cell Protection

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Timur 2017-05-05 09:06:37 UTC
Nice. Button is in Formatting toolbar by default or it can be added via Customize Toolbar-Add Command-Format-Cell Protection. 

Also mentioned in https://wiki.documentfoundation.org/ReleaseNotes/5.4. as "A new command and toggle button was added to format object bar to change the protection status of the cell." I guess "format object bar" refers to "Formatting toolbar".
Comment 22 Gülşah Köse 2017-05-05 18:43:48 UTC
Copied from formatobjectbar.xml. Corrected thanks.
Comment 23 Yousuf Philips (jay) 2017-05-19 21:52:51 UTC
(In reply to Timur from comment #21)
> Nice. Button is in Formatting toolbar by default or it can be added via
> Customize Toolbar-Add Command-Format-Cell Protection. 

This will be removed from the toolbar as the feature isnt used enough to be in the toolbar and we have limited space in the toolbar already with more useful commands hidden by default in them. It likely should be in the menu bar, so lets put it in Edit.

https://gerrit.libreoffice.org/37845
Comment 24 Commit Notification 2017-05-21 15:17:16 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f856935db77d2f1eeeb6fd297d09ef4262df8761

tdf#95885 move cell protect command from toolbar to menu

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Timur 2017-05-23 08:18:12 UTC
(In reply to Yousuf Philips (jay) from comment #23)
> This will be removed from the toolbar as the feature isnt used enough to be
> in the toolbar 

It's true it's probably not used enough to be visible in the toolbar, but I strongly disagree with removing it from the toolbar altogether. 

> and we have limited space in the toolbar already with more
> useful commands hidden by default in them.

Why can't it be in the toolbar non visible, i.e. just hidden? What is "limited space"? 
Please set it back to the toolbar as hidden and have some discussion prior to making changes like these.
Comment 26 Yousuf Philips (jay) 2017-05-24 04:23:04 UTC
(In reply to Timur from comment #25)
> Why can't it be in the toolbar non visible, i.e. just hidden? What is
> "limited space"? 

It cant be in the toolbar non-visible as that is reserved for buttons that are useful enough to be visible by default, but are hidden by default due to the limited space provided for toolbar entries according to our HIG[1]. We provide these hidden items to save users from having to dig through the add command dialog to find highly used functions that they would likely enable. If we placed every single entry into the toolbar as hidden, customizing it would be a nightmare.

[1] https://wiki.documentfoundation.org/Design/ToolBar

> Please set it back to the toolbar as hidden and have some discussion prior
> to making changes like these.

If others in the UX team agree that it should be hidden by default, it can be added back. @Cor, @Heiko, @Stuart: Your thoughts?

Please in the future if your suggestion relates to UI changes, have someone from the UX team sign off on it, as Heiko didnt okay it being in the toolbar in comment 6.
Comment 27 Buovjaga 2017-05-24 04:27:34 UTC
I would like to add that Markus is in Jay's camp, because he would rather have seen this whole thing as an extension. Design team is advised to consult the Calc devs more.
Comment 28 Yousuf Philips (jay) 2017-05-24 23:14:50 UTC
(In reply to Buovjaga from comment #27)
> I would like to add that Markus is in Jay's camp, because he would rather
> have seen this whole thing as an extension.

Not sure why a simple UNO command to check a checkbox in a dialog should be delegated to an extension, as i'm quite sure this UNO command will find its way into the Notebookbar review tab.

> Design team is advised to consult the Calc devs more.

UX/design team is to approve valid enhancements and suggest how it should appear in the UI and Calc devs have the opportunity to disagree with validated enhancements from the time they are approved, all the way until code is merged, so Calc devs are always consulted as they are the ones merging the code.
Comment 29 Commit Notification 2017-06-02 12:26:07 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dd243ec54a061f5d97650aad24ac5ddc0feb2b15&h=libreoffice-5-4

tdf#95885 move cell protect command from toolbar to menu

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.