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 compact sidebar subtitle not visible #1767

Merged
merged 2 commits into from
Mar 27, 2021
Merged

Conversation

raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Mar 18, 2021

This fixes a CSS rule interference with a rule from server which lead to the sidebar subtitle not being visible in compact mode. This was originally reported here nextcloud/server#24138

Explanation:

This rule

#content[class*="app-"] * {
    box-sizing: border-box;
}

from server took precedence over the box-sizing: content-box; from the components, which, in combination with the fixed height: $desc-height;, lead to the height of the description being wrong.

I removed the fixed height (and the overwritten border-box), which should solve the issue. The alternative would be to set box-sizing: content-box !important; or to set a correct height: $desc-height + 2*$desc-vertical-padding;. But I think simply removing the height is cleaner.

It might be that we need to commit new base images for the visual regression tests, because the sidebar height changes by 2px because of this fix (this is because the subtitle height is given as 22px, but since it is not enforced by actually setting the height of the subtitle, the subtitle is 24px high in reality).

Please have a look @skjnldsv.

Edit:

Before:
Screenshot_2021-03-19 Dokumente - Dateien - Nextcloud

After:
Screenshot_2021-03-19 Dokumente - Dateien - Nextcloud(1)

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
@raimund-schluessler raimund-schluessler added bug Something isn't working 3. to review Waiting for reviews feature: app-sidebar Related to the app-sidebar component labels Mar 18, 2021
@raimund-schluessler
Copy link
Contributor Author

I wonder how we can distribute the fix to server. It is a problem in stable 21 and 20 (probably even in older versions). But they are still on vue-components 3.2.0 and 2.6.9, respectively. Would we need to release a vue components 3.2.1 and 2.6.10? Or should we directly commit a fix in stable 21 and 20 to workaround the issue in the components?

@raimund-schluessler
Copy link
Contributor Author

@skjnldsv Six regression tests fail, with 0.013 difference. Could you have a look and upload new reference images if necessary? I think you did it the last time and the base images generated locally on my system differ from the ones the remote tests generate.

@skjnldsv
Copy link
Contributor

Would we need to release a vue components 3.2.1 and 2.6.10

yes

@skjnldsv
Copy link
Contributor

@skjnldsv
Copy link
Contributor

We need to create the stable3 branch too

@raimund-schluessler
Copy link
Contributor Author

https://github.com/nextcloud/nextcloud-vue/tree/stable2

Hm, the nextcloud-vue stable2 version is 2.9.0. Server stable 20 still lacks behind quite a bit. Is it realistic that server will get an update?

@skjnldsv
Copy link
Contributor

Is it realistic that server will get an update?

depends on what the changelog between the two is?
but if there is no breaking changes, sure!

@skjnldsv
Copy link
Contributor

Hm, the nextcloud-vue stable2 version is 2.9.0. Server stable 20 still lacks behind quite a bit. Is it realistic that server will get an update?

v2.6.9...v2.9.0

@skjnldsv
Copy link
Contributor

Seems good enough!

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 27, 2021
@skjnldsv
Copy link
Contributor

/backport to stable2

@skjnldsv skjnldsv merged commit b335faa into master Mar 27, 2021
@skjnldsv skjnldsv deleted the fix/noid/sidebar-border-box branch March 27, 2021 09:31
@backportbot-nextcloud
Copy link

The backport to stable2 failed. Please do this backport manually.

@skjnldsv
Copy link
Contributor

@raimund-schluessler care to backport? 🙈

@raimund-schluessler
Copy link
Contributor Author

@raimund-schluessler care to backport? 🙈

@skjnldsv Thanks for taking care of the cypress screenshots! I will have a look at the backport.

@raimund-schluessler
Copy link
Contributor Author

raimund-schluessler commented Mar 28, 2021

@skjnldsv Backport is in #1789.

By the way, updating the server CSS in #1537 broke some other stuff from the sidebar too.

  • the subtitle was cut at the bottom when the title was edited
Before #1537 After #1537
Screenshot_2021-03-19 Dokumente - Dateien - Nextcloud Screenshot_2021-03-19 Dokumente - Dateien - Nextcloud

The cut subtitle was coincidentally fixed by this PR #1767 here 🙈 But the text is still moving when enabling the edit mode (which is a nitpick only). I will still create an issue for the moving text and have a look: #1790.

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 backport-request bug Something isn't working feature: app-sidebar Related to the app-sidebar component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants