-
Notifications
You must be signed in to change notification settings - Fork 509
Fix missing Talk sidebar trigger in public share pages #7593
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| <!-- | ||
| - @copyright Copyright (c) 2022 Daniel Calviño Sánchez <[email protected]> | ||
| - | ||
| - @license GNU AGPL version 3 or any later version | ||
| - | ||
| - This program is free software: you can redistribute it and/or modify | ||
| - it under the terms of the GNU Affero General Public License as | ||
| - published by the Free Software Foundation, either version 3 of the | ||
| - License, or (at your option) any later version. | ||
| - | ||
| - This program is distributed in the hope that it will be useful, | ||
| - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| - GNU Affero General Public License for more details. | ||
| - | ||
| - You should have received a copy of the GNU Affero General Public License | ||
| - along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| - | ||
| --> | ||
|
|
||
| <template> | ||
| <div class="button-holder"> | ||
| <Button type="tertiary-on-primary" | ||
| :aria-label="ariaLabel" | ||
| @click="$emit('click')"> | ||
| <template #icon> | ||
| <MenuPeople :size="20" /> | ||
| </template> | ||
| </Button> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script> | ||
| import Button from '@nextcloud/vue/dist/Components/Button' | ||
| import MenuPeople from './components/missingMaterialDesignIcons/MenuPeople.vue' | ||
|
|
||
| export default { | ||
|
|
||
| name: 'PublicShareSidebarTrigger', | ||
|
|
||
| components: { | ||
| Button, | ||
| MenuPeople, | ||
| }, | ||
|
|
||
| props: { | ||
| sidebarState: { | ||
| type: Object, | ||
| required: true, | ||
| }, | ||
| }, | ||
|
|
||
| computed: { | ||
| ariaLabel() { | ||
| if (this.sidebarState.isOpen) { | ||
| return t('spreed', 'Close Talk sidebar') | ||
| } | ||
|
|
||
| return t('spreed', 'Open Talk sidebar') | ||
| }, | ||
| }, | ||
|
|
||
| } | ||
| </script> | ||
|
|
||
| <style scoped> | ||
| .button-holder { | ||
| margin: 2px 5px 2px 2px; | ||
| display: flex; | ||
| justify-content: center; | ||
|
Comment on lines
+69
to
+70
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it needed to horizontally center the button? As the div has no explicit width it should have the width of its child elements, so the button should be already centerd in the div. Or am I missing something?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copied this from the app icons and only then the centering worked as expected.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, I tried removing the rules and as far as I can tell it was working fine. But same as above, maybe it is related to the browser, no idea 🤷 |
||
| height: 44px !important; | ||
| } | ||
| </style> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header contents are vertically centered. Are the vertical margins needed?
Out of curiosity, why 5px instead of 2px for
margin-right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The margins where needed otherwise the box shadow was cut off.
For the right sidebar I added 3px on top so the white border of keyboard active doesn't touch the browser as it looked too weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried removing the margins (or, rather, replacing with
margin-right: 3px) and as far as I can tell it was working fine 🤷 That is why I was asking. But maybe it depends on the browser, I do not know.👍