[Feature] Add the ability to delete old recent projects from Start WB

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by chennes »

I worked on this for a little while today and I need some feedback. Here's what it looks like at the moment (the little pins and Xs in the upper right of each card):
Capture.PNG
Capture.PNG (297.13 KiB) Viewed 928 times
It is far easier to just have those icons display all the time, but I personally think it's a bit cluttered. So I was thinking of making them hidden until you mouse over the card. Does anyone care either way?

Next: when you click the X I'll reload the page immediately, so the card will vanish right away. But right now the way it works is things that are pinned are actually displayed first (you can't tell right now because it's the same icon :? but that first card is actually pinned). My thought is that when you click the pin, though, the card shouldn't move, the pin should just change somehow (color?). Then, only when you restart FreeCAD will that pin relocate to the front of the list. Does that behavior make sense?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by Kunda1 »

Thanks for working on this @chennes. Here's my feedback:
chennes wrote: Thu Dec 31, 2020 1:38 am It is far easier to just have those icons display all the time, but I personally think it's a bit cluttered. So I was thinking of making them hidden until you mouse over the card. Does anyone care either way?
This is an aesthetic judgement, IMO ;) and therefore something that the user should be able to choose. I personally like them visible all the time.
chennes wrote: Thu Dec 31, 2020 1:38 am Next: when you click the X I'll reload the page immediately, so the card will vanish right away. But right now the way it works is things that are pinned are actually displayed first (you can't tell right now because it's the same icon :? but that first card is actually pinned). My thought is that when you click the pin, though, the card shouldn't move, the pin should just change somehow (color?). Then, only when you restart FreeCAD will that pin relocate to the front of the list. Does that behavior make sense?
Personally, I like the idea of a dynamic 'card will vanish right away' UX.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
watsug
Posts: 100
Joined: Sat Sep 26, 2020 10:51 pm

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by watsug »

I think I'd prefer hidden icons that show when mouse over card. The pin icon could be a darker grey/black when pinned.
Agree that newly pinned items shouldn't move until restart.

On MacOS (and guess some linux distros) the X to close is on the left, is this reflected here? (nbd if not)

Another thought is the wording "delete", maybe "remove" is better, as the file is still on disk. Tooltip on X hover can be Remove from list
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by chennes »

watsug wrote: Thu Dec 31, 2020 10:53 am Another thought is the wording "delete", maybe "remove" is better, as the file is still on disk. Tooltip on X hover can be Remove from list
You have read my mind - that's exactly what I went with. (And right now the position of the X is hard-coded in the CSS, but once I have some users playing with it we can revisit).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by Kunda1 »

I don't feel particularly like a "hardliner" here. Any of the solutions that you proposed so far are fine with me. +1
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by chennes »

OK, I have a first implementation working -- it needs some code cleanup, but the functionality is there. If anyone wants to test it out, it's at
https://github.com/chennes/FreeCAD/tree/recentFiles

I'll get to work cleaning it up for a PR.

I decided to go with a very low opacity default state for the icons, and when you mouse over the card they go to full opacity. Probably in the long run that could get controlled by the stylesheet, right now it's hardcoded into the Javascript.

The one thing I still can't get working is updating the File menu entries when you remove a file from the Recent list. If anyone knows how to trigger the recreation of that menu entry please let me know.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
JohnOCFII
Posts: 112
Joined: Sun Sep 20, 2020 5:46 pm
Location: Minnesota, USA

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by JohnOCFII »

Looking at the current release 0.20 version, I'm guessing this PR didn't make it in? I was also looking for a way to "clear" the recent files list from the Files menu:
Attachments
Screen Shot 2022-07-08 at 3.42.23 PM.png
Screen Shot 2022-07-08 at 3.42.23 PM.png (774.59 KiB) Viewed 682 times
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by adrianinsaval »

chennes wrote: Thu Dec 31, 2020 1:38 am the pin should just change somehow (color?)
other options is tilted icon when unpinned, shown only on mouse over the card, vertical and persistent when pinned.
Another options is strikethrough when unpinned. For all options I suggest a round background for the icon to ensure good contrast, the first card in your image doesn't look very good overlayed over the preview IMO.
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by chennes »

JohnOCFII wrote: Fri Jul 08, 2022 8:42 pm Looking at the current release 0.20 version, I'm guessing this PR didn't make it in?
I never did find a way to actually get the Recent Files menu to rebuild itself without relaunching FreeCAD, and this project was low priority, so it fell off my radar.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: [Feature] Add the ability to delete old recent projects from Start WB

Post by adrianinsaval »

damn, I didn't notice this was from 2020 :oops:
Post Reply