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

Move subscribe button to search area of Navigation #2932

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

lgabardos
Copy link
Contributor

Summary

The subscribe button is inside a container which is expecting to have more entries
The NcAppNavigation is having a dedicated place where an action button should belong, it's in the "search" slot (according to Nextcloud Contact app )

Checklist

Signed-off-by: Laurent Gabardos <l.gabardos@proton.me>
@lgabardos lgabardos force-pushed the subscribe_area_scrollbar branch from 5bd8996 to 6e7c8e0 Compare November 25, 2024 15:24
@wofferl
Copy link
Collaborator

wofferl commented Nov 25, 2024

Thanks for your PR, but as I said in the discussions thread the #search slot has its own purpose and unlike the contact app, news has no in-app search.

search For in-app search you can pass a NcAppNavigationSearch component as the slot content.

Looking where NcAppNavigationNew is used, e.g. global accounts setting in nextcloud, in the notes app, etc where it behave the same, let me think that this is a bug in the component, which should reported upstream.

@lgabardos
Copy link
Contributor Author

Thanks for your PR, but as I said in the discussions thread the #search slot has its own purpose and unlike the contact app, news has no in-app search.

search For in-app search you can pass a NcAppNavigationSearch component as the slot content.

Looking where NcAppNavigationNew is used, e.g. global accounts setting in nextcloud, in the notes app, etc where it behave the same, let me think that this is a bug in the component, which should reported upstream.

Let’s wait for your feedback on that
As I said, I’m not a big fan of the « css way » to fix the issue.
Though, it might be a bug in the global component.

@wofferl
Copy link
Collaborator

wofferl commented Nov 26, 2024

Let’s wait for your feedback on that As I said, I’m not a big fan of the « css way » to fix the issue. Though, it might be a bug in the global component.

Reading Nextcloud Vue Components it seems to be no bug, but you need to mock the content like described in the examples.

e.g.:

	<style scoped>
		/* Mock NcContent */
		.styleguide-nc-content {
			overflow: hidden;
		}
	</style>

You can do this if you want and if so you can also move the "new folder" button above, this should not belong to the list.

@lgabardos
Copy link
Contributor Author

Let’s wait for your feedback on that As I said, I’m not a big fan of the « css way » to fix the issue. Though, it might be a bug in the global component.

Reading Nextcloud Vue Components it seems to be no bug, but you need to mock the content like described in the examples.

e.g.:

	<style scoped>
		/* Mock NcContent */
		.styleguide-nc-content {
			overflow: hidden;
		}
	</style>

You can do this if you want and if so you can also move the "new folder" button above, this should not belong to the list.

I'm adding more intel
nextcloud-libraries/nextcloud-vue#6079
nextcloud/polls#3704

I think it's an issue of the "default" template on the NcAppNavigation
I don't understand why the css class ".app-navigation__body" has a "overflow-y: scroll". It forces the content to have a scroll and then it's cropped.

For this PR, I'm thinking to do the same as "polls", use a "hack" css to display properly the ".app-navigation__body".
So, I wanted to put the css change in "~/css/navigation.scss" but it seems that all scss are not used in the app? Am I wrong?

@wofferl
Copy link
Collaborator

wofferl commented Nov 26, 2024

For this PR, I'm thinking to do the same as "polls", use a "hack" css to display properly the ".app-navigation__body". So, I wanted to put the css change in "~/css/navigation.scss" but it seems that all scss are not used in the app? Am I wrong?

You are right, this seems to be a leftover from news 24, but I'm also not yet through what can be removed.
For this I think the right place is a <style scoped> in Sidebar.vue as shown in the Nextcloud Component documentation.

@lgabardos
Copy link
Contributor Author

For this PR, I'm thinking to do the same as "polls", use a "hack" css to display properly the ".app-navigation__body". So, I wanted to put the css change in "~/css/navigation.scss" but it seems that all scss are not used in the app? Am I wrong?

You are right, this seems to be a leftover from news 24, but I'm also not yet through what can be removed. For this I think the right place is a <style scoped> in Sidebar.vue as shown in the Nextcloud Component documentation.

Unfortunately, the style scoped cannot be used here because the [data-xxx] applied to the scoped css cannot target the ".app-navigation__body" class
it needs to be in a global place...
I don't know the Nextcloud guidelines for such changes...

  • a <style> tag in the Sidebar.vue
  • add css class in App.vue (which already has a <style> tag)
  • Add a "hack.scss" and link it in App.vue

I got a preference for the last one

@wofferl
Copy link
Collaborator

wofferl commented Nov 26, 2024

For this PR, I'm thinking to do the same as "polls", use a "hack" css to display properly the ".app-navigation__body". So, I wanted to put the css change in "~/css/navigation.scss" but it seems that all scss are not used in the app? Am I wrong?

You are right, this seems to be a leftover from news 24, but I'm also not yet through what can be removed. For this I think the right place is a <style scoped> in Sidebar.vue as shown in the Nextcloud Component documentation.

Unfortunately, the style scoped cannot be used here because the [data-xxx] applied to the scoped css cannot target the ".app-navigation__body" class it needs to be in a global place... I don't know the Nextcloud guidelines for such changes...

* a <style> tag in the Sidebar.vue

* add css class in App.vue (which already has a <style> tag)

* Add a "hack.scss" and link it in App.vue

I got a preference for the last one

This should work in Sidebar.vue

<style scoped>
/*
 * workaround remove extra scroll bar in navigation body
 */
:deep(.app-navigation__body) {
  overflow: unset;
}
</style>

Move new folder in the default template instead of list

Signed-off-by: Laurent Gabardos <l.gabardos@proton.me>
@lgabardos lgabardos force-pushed the subscribe_area_scrollbar branch from d0ee1c4 to 1839680 Compare November 26, 2024 11:54
@wofferl
Copy link
Collaborator

wofferl commented Nov 26, 2024

Thanks. Please fix the linter errors showing by npm run lint and add a changelog entry.

Signed-off-by: Laurent Gabardos <l.gabardos@proton.me>
@lgabardos lgabardos force-pushed the subscribe_area_scrollbar branch from 256b820 to e4530cf Compare November 26, 2024 12:05
@wofferl wofferl merged commit 1a9e7f0 into nextcloud:master Nov 26, 2024
23 of 24 checks passed
@lgabardos lgabardos deleted the subscribe_area_scrollbar branch November 26, 2024 16:43
Grotax added a commit that referenced this pull request Nov 27, 2024
Changed
- Items list style in compact mode to improve readability (and better match v24's style) (#2918)
- add shortcuts `e` or `enter` to open and `esc` to close article details in compact mode (#2934)

Fixed
- scrollbar in sidebar subscribe area / move new folder button in same area than subscribe (#2932)
- move shortcuts to list component to work also in compact mode (#2934)
- add proper title to icons in item list and details view for better accessibility (#2934)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
@Grotax Grotax mentioned this pull request Nov 27, 2024
Grotax added a commit that referenced this pull request Nov 27, 2024
Changed
- Items list style in compact mode to improve readability (and better match v24's style) (#2918)
- add shortcuts `e` or `enter` to open and `esc` to close article details in compact mode (#2934)

Fixed
- scrollbar in sidebar subscribe area / move new folder button in same area than subscribe (#2932)
- move shortcuts to list component to work also in compact mode (#2934)
- add proper title to icons in item list and details view for better accessibility (#2934)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
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.

Subscribe button container has a scrollbar
2 participants