Bug 468212

Summary: Clicking an Artist's name when viewing an Album should add to the ContentView's history
Product: [Applications] Elisa Reporter: Jack Hill <jackhill3103>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: wishlist CC: all, ben, nate
Priority: NOR    
Version: 22.12.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 23.12.0
Sentry Crash Report:
Attachments: Visual demonstration

Description Jack Hill 2023-04-06 15:24:13 UTC
SUMMARY

STEPS TO REPRODUCE
1. Click Albums in the left sidebar
2. Open an album (notice there is a button to go back)
3. Click the Artist's name in the ContentView toolbar
4. Click the back button

OBSERVED RESULT
I am taken to the "Artists" list

EXPECTED RESULT
I expect to be taken back to the album that I was viewing

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230404
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.9-1-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Ben Bonacci 2023-04-07 12:13:46 UTC
I can successfully reproduce this issue on version 22.12.3. When I clicked on the artist name in the toolbar, it goes to the artist section and briefly shows the artists, then it shows the albums while still in the artist section.
Comment 2 Ben Bonacci 2023-04-07 12:14:18 UTC
Created attachment 157922 [details]
Visual demonstration
Comment 3 Mel 2023-04-23 19:31:15 UTC
I looked into this and it seems to be intentional. 

In `ViewManager::openChildView` there's a loop that checks to see if the upcoming view is the same type (e.g. album, artist, genre...)  as the current view. If it's not it override the upcoming view with the generic base view of the new type. (Causing this exact issue, where the Album view pops up and then the specific artist's album list shows a second later.)

Removing that loop resolves this issue, and fixes a lot of weird navigation issues. However this can also create a situation where if you click on the Artist a bunch of times, it will just keep appending that view to the history. 

If this sounds like a good change to the maintainers, I can get a merge request up with that loop removal, and a infinite history fix.
Comment 4 Nate Graham 2023-04-25 20:35:05 UTC
Sort of intentional, but probably not ideal. When the user presses a back button, they expect to be taken back where they were before. +1 for changing this.
Comment 5 Bug Janitor Service 2023-04-26 06:12:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/452
Comment 6 Bug Janitor Service 2023-06-09 17:06:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/465
Comment 7 Bug Janitor Service 2023-09-26 15:42:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/497
Comment 8 Jack Hill 2023-09-27 13:21:57 UTC
Git commit c345571f30a816682a66ae002e74debe4e2b313d by Jack Hill.
Committed on 26/09/2023 at 17:24.
Pushed by ngraham into branch 'master'.

Always open a view as a child when not opened from the sidebar

Previously if the artists list was embedded into the sidebar and we
tried to open an artist from an album page, then the view history was
reset. Now the artist page is pushed onto the view stack.

M  +7    -27   src/viewmanager.cpp
M  +0    -26   src/viewslistdata.cpp
M  +0    -4    src/viewslistdata.h

https://invent.kde.org/multimedia/elisa/-/commit/c345571f30a816682a66ae002e74debe4e2b313d