Skip to content

Commit

Permalink
Tweak roles selection dropdown
Browse files Browse the repository at this point in the history
Remove roles description text from the roles selection button, but keep it in the dropdown list.
Add chevron icon on the right.
  • Loading branch information
Vincent Petry committed Sep 16, 2020
1 parent 293e459 commit 421ca9b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
6 changes: 5 additions & 1 deletion apps/files/src/components/Roles/RoleItem.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<template>
<div class="roles-select-role-item">
<span class="uk-text-bold" v-text="role.label" />
<p class="uk-text-meta uk-margin-remove" v-text="role.description" />
<p v-if="showDescription" class="uk-text-meta uk-margin-remove" v-text="role.description" />
</div>
</template>

<script>
export default {
name: 'RoleItem',
props: {
showDescription: {
type: Boolean,
default: true
},
role: {
type: Object,
required: true
Expand Down
7 changes: 6 additions & 1 deletion apps/files/src/components/Roles/RolesSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
:id="`files-${mode}-role-button`"
:class="`uk-width-1-1 files-${mode}-role-button uk-flex-left`"
>
<role-item :role="selectedRole" class="uk-margin-xsmall-top uk-margin-xsmall-bottom" />
<role-item
:show-description="false"
:role="selectedRole"
class="uk-margin-xsmall-top uk-margin-xsmall-bottom"
/>
<oc-icon name="expand_more" size="small" class="uk-position-center-right" />
</oc-button>
<oc-drop
close-on-click
Expand Down
8 changes: 8 additions & 0 deletions changelog/unreleased/adjust-roles-selection-dropdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Change: Adjustments to roles selection dropdown

The role description text from the roles selection button has been removed, but is
still visible when opening the dropdown.
The dropdown now also has a chevron icon to make it clearer that it is a dropdown.

https://github.com/owncloud/phoenix/pull/4080
https://github.com/owncloud/product/issues/231

0 comments on commit 421ca9b

Please sign in to comment.