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

Right sidebar has no tab headers anymore on the files app when activity app is enabled #38229

Closed
nickvergessen opened this issue May 12, 2023 · 7 comments · Fixed by nextcloud-libraries/nextcloud-vue#4111
Assignees
Labels
4. to release Ready to be released and/or waiting for tests to finish 26-feedback feature: files high regression

Comments

@nickvergessen
Copy link
Member

Since this is merged, the right sidebar has no tab headers anymore on the files app:

$ git bisect good
9dc8e75bf2b1302d954aa7a77916372488b5fa32 is the first bad commit
commit 9dc8e75bf2b1302d954aa7a77916372488b5fa32
Author: Christopher Ng <[email protected]>
Date:   Mon Apr 24 16:14:15 2023 -0700

    Bump @nextcloud/vue from 7.8.0 to 7.10.0
    
    Signed-off-by: Christopher Ng <[email protected]>

 dist/core-common.js     | Bin 15071827 -> 15173921 bytes
 dist/core-common.js.map | Bin 30132375 -> 30462285 bytes
 package-lock.json       | 311 ++++++++++++++++++++++++++++++++++++++++++------
 package.json            |   2 +-
 4 files changed, 275 insertions(+), 38 deletions(-)

Console is glowing red:

TypeError: e is null
    VueJS 3
    renderIcon NcAppSidebarTab.js:2
    B NcAppSidebar.js:2
    Xe VueJS
    B NcAppSidebar.js:2
    VueJS 14
    i Sidebar.vue:435
    d runtime.js:24
    t runtime.js:267
    T runtime.js:85
    E LegacyView.vue:19
    s LegacyView.vue:19
    promise callback*E LegacyView.vue:19
    s LegacyView.vue:19
    P LegacyView.vue:19
    P LegacyView.vue:19
    open Sidebar.vue:425
    _updateDetailsView filelist.js:709
    actionHandler filelist.js:588
    action fileactions.js:136
    _onClickFile filelist.js:934
    Underscore 3
    jQuery 10
    initialize filelist.js:386
    FileList filelist.js:32
    initialize app.js:83
    <anonymous> app.js:400
    Underscore 5
    <anonymous> app.js:399
    EventListener.handleEvent* app.js:396
vue.runtime.esm.js:3018:57

grafik

Only happens when "legacy sidebar" apps are enable, e.g. the default shipped app activity

Originally posted by @nickvergessen in #37910 (comment)

@nickvergessen
Copy link
Member Author

cc @Pytal @szaimen @skjnldsv

@nickvergessen nickvergessen added this to the Nextcloud 26.0.2 milestone May 12, 2023
@nickvergessen nickvergessen changed the title Right sidebar has no tab headers anymore on the files app Right sidebar has no tab headers anymore on the files app when activity app is enabled May 12, 2023
@szaimen
Copy link
Contributor

szaimen commented May 12, 2023

Cc @nextcloud/server-frontend

@Pytal
Copy link
Member

Pytal commented May 13, 2023

Fixed in nextcloud/activity#1167

@Pytal Pytal added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels May 13, 2023
@nickvergessen
Copy link
Member Author

So there is a breaking API change in a patch release and it not raised in the docs or the issue for developers.
Can that also be fixed? 😅

@skjnldsv
Copy link
Member

breaking API change in a patch release

link ?

@nickvergessen
Copy link
Member Author

nickvergessen commented May 13, 2023

link ?

The activity app did work fine in 26.0.1 and breaks the files app due to a server change/update in 26.0.2

Looking through the Vue lib this here sounds as most-related: nextcloud-libraries/nextcloud-vue#3891

cc @ShGKme

@ShGKme
Copy link
Contributor

ShGKme commented May 13, 2023

So there is a breaking API change
or the issue for developers.

In nextcloud-libraries/nextcloud-vue#3891 API wasn't changed, NcAppSidebarTab still supports the icon prop with CSS icon as a fallback of the #icon slot. It works in styleguidist and any app, that renders the sidebar with tabs.

A bug is interesting.

The icon is rendered by NcAppSidebarTab.renderIcon() in NcAppSidebarTabs. It seems to me when it is used with OCA.Files.Sidebar (and maybe LegacyView), Tabs and Tab components are rendered by different Vue copies on the page (on my instance 24 different copies of Vue are bundled).

As a result, when NcAppSidebarTab.renderIcon() is called in NcAppSidebarTabs's rendering, it doesn't know about the rendering. NcAppSidebarTab.renderIcon() creates VNode in one Vue copy, but is used in rendering in another Vue copy. It fails, because for NcAppSidebarTab.renderIcon() there is no rendering in the first Vue copy

Currently, I cannot prove it with a detailed explanation, but I'm sure for 95% 😅

Fixed in nextcloud/activity#1167

These problems are different. Originally that PR fixes a problem caused by the regression of the new tabs design (with NcCheckboxRadioSwitch) in 8.0.0. Styles for CSS icons were lost.

Nevertheless, that PR also resolves this issue, because this issue is about CSS icons while the PR changes a CSS icon to a SVG in a slot.

@Pytal Pytal added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish 26-feedback feature: files high regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants