Desktop: Add "Edit" pencil button to edit the list of ignored files next to the folder icon

Created on 17 Oct 2019  路  10Comments  路  Source: nextcloud/desktop

About #1523 @jancborchardt said:

"Also, what will the folder icon on the right do? Could we make it an "Edit" pencil / https://docs.nextcloud.com/server/17/developer_manual/_images/rename.png ) and when clicked it could go to edit the ignore list?"

ignoredfiles

design enhancement good first issue

All 10 comments

Hi @camilasan, can you explain me a little bit more about what should be done in this issue?
From what I understood I have to change the small folder icon to this one you linked.
And then I have to find the "edit the ignore list" function in the code and make a connection between the button and the function. Is that correct?
Also, is it okay if I take this one to work?
Thanks :)

Hi @camilasan, can you explain me a little bit more about what should be done in this issue?

Yes! Of course!

From what I understood I have to change the small folder icon to this one you linked.

The small folder should stay and next to it you would add a button to edit the ignore list

And then I have to find the "edit the ignore list" function in the code and make a connection between the button and the function. Is that correct?

That is correct.

Also, is it okay if I take this one to work?

Yes, please :D

Thanks :)

Here @marimeireles it is where the drawing of buttons magic :star2: happens:
https://github.com/nextcloud/desktop/blob/master/src/gui/activityitemdelegate.cpp#L81

Welcome @marimeireles 馃憢 :D

@camilasan so I would say design-wise:

  • the folder icon can go in this case, since otherwise we have folder icons / actions on every single notification. Here we only need the edit icon.
  • if possible, it would be good to directly give it a label too, called "Edit ignore list"
  • and since it鈥檚 a button with label it will probably also look better styled as a button (as opposed to the icon-only folder where styling it as button would look strange).

What do you think?

  • [x] Fix bug that was blocking the signal from being emitted;

  • [x] Substitute folder icon for rename icon;

  • [x] It's necessary to create a new data type in activityData.h and then implement it on activityWidget.cpp. I should probably changeslotItemCompleted to be able to do that;

  • [ ] To make the connection between the button and the right slot I'll need to add the method GeneralSettings::slotIgnoreFilesEditor() to the void ActivityWidget::slotSecondaryButtonClickedOnListView(const QModelIndex &index) method.
    slotIgnoreFilesEditor is private so, to do that I'll need to create the connection modifying the settingsdialog.cpp file.

I believe there is some kind of "circular" implementation for opening a folder when you double click in the icon on the right.
When I found this first bug and I wasn't able to emit the sign correctly the behavior "click the button open the directory containing the file" still worked even though it shouldn't. I wasn't able to pin point what's going on but I wanted to write it down here to let it "archived" somewhere.

Thanks @marimeireles of the past for documenting everything. The last comment was already solved, a signal wasn't being emitted correctly.

@jancborchardt actually... there's more than one ignore list file, there's a global one and a per folder one. If I got only one notification like above (and the new GUI does this as well) if I click it's unclear which file should be opened. Indeed some of the files in that notification might be ignored due to the global list, some other files might be ignored due to one of the per folder ignore list.

@er-vin then as a start, could we group the notifications based on which ignore list they are ignored by?

This will take care of the majority of setups which use the default setting of only 1 folder.

@er-vin then as a start, could we group the notifications based on which ignore list they are ignored by?

Unsure, would need some investigation.

Was this page helpful?
0 / 5 - 0 ratings