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

fix(NcAppContent): don't remove list when showing details in mobile or no-split mode #6261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wofferl
Copy link
Contributor

@wofferl wofferl commented Nov 23, 2024

☑️ Resolves

As mentioned in #6204 the change in 8.10.0 causes the item list to rebuild every time the details of an item are shown.
With a dynamic list like in the news app, where read items are removed from the list when refreshing it, this means that the selected item you looked at the details are gone immediately when you close the details.
It also affects the performance, because of the rebuilding when closing the details, which is notable on mobile devices.

I think there is no technical reason to delete it, so it is better to just hide the list.

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.29%. Comparing base (a4bb820) to head (d82dbf3).
Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6261      +/-   ##
==========================================
- Coverage   42.62%   42.29%   -0.34%     
==========================================
  Files         154      154              
  Lines        4040     3989      -51     
  Branches     1017     1024       +7     
==========================================
- Hits         1722     1687      -35     
+ Misses       2206     2190      -16     
  Partials      112      112              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@@ -67,9 +67,9 @@ The list size must be between the min and the max width value.
'app-content-wrapper--show-list': !showDetails,
'app-content-wrapper--mobile': isMobile,}">
<NcAppDetailsToggle v-if="showDetails" @click.native.stop.prevent="hideDetails" />
<slot v-if="!showDetails" name="list" />
<slot v-show="!showDetails" name="list" />
Copy link
Contributor

Choose a reason for hiding this comment

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

v-show is a node directive, it sets display: none on the node. While <slot> is not a node. It is a special tag specifying a place to execute a content render function.

Using v-show on <slot> is not possible in both Vue 2 and Vue 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I understand. So it simply ignored the v-show part during my tests and worked like before 8.10.0, because hiding is done with this css, as I can see now.

.app-content-wrapper--no-split {
        &.app-content-wrapper--show-list :deep() {
                .app-content-list {
                        display: flex;
                }
                .app-content-details {
                        display: none;
                }               
        }
        &.app-content-wrapper--show-details :deep() {
                .app-content-list {
                        display: none;
                }               
                .app-content-details {
                        display: block;
                }
        }
}

But why the change to remove the list here completely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NcAppContent] list is rebuild every time when details were shown with no-split or mobile view
2 participants