Skip to content

feat(web-core): add accent prop to MenuItem - #10348

Open
amouillard-vates wants to merge 3 commits into
masterfrom
web-core/add-menu-item-accent-prop
Open

feat(web-core): add accent prop to MenuItem#10348
amouillard-vates wants to merge 3 commits into
masterfrom
web-core/add-menu-item-accent-prop

Conversation

@amouillard-vates

Copy link
Copy Markdown
Collaborator

Description

Adds accent prop to MenuItem and remove local overrides

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

Review process

If you are an external contributor, you can skip this part. Simply create the pull request, and we'll get back to you as soon as possible.

This 2-passes review process aims to:

  • develop skills of junior reviewers
  • limit the workload for senior reviewers
  • limit the number of unnecessary changes by the author
  1. The author creates a PR.
  2. Review process:
    1. The author assigns the junior reviewer.
    2. The junior reviewer conducts their review:
      • Resolves their comments if they are addressed.
      • Adds comments if necessary or approves the PR.
    3. The junior reviewer assigns the senior reviewer.
    4. The senior reviewer conducts their review:
      • If there are no unresolved comments on the PR → merge.
      • Otherwise, we continue with 3.
  3. The author responds to comments and/or makes corrections, and we go back to 2.

Notes:

  1. The author can request a review at any time, even if the PR is still a Draft.
  2. In theory, there should not be more than one reviewer at a time.
  3. The author should not make any changes:
    • When a reviewer is assigned.
    • Between the junior and senior reviews.
  4. If the PR relates to a change in the openAPI specification, a member of the DevOps team must also participate in the review.

@sylvere-a sylvere-a left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Additional file to be changed: @xen-orchestra/web/src/modules/pool/components/list/PoolsTable.vue:
    'action:forget' and 'action:disconnect' should have the "danger" accent as well.

  • The XO Lite changelog should probably be updated?

<MenuItem accent="brand" icon="fa:layer-group" @click="emit('convertToGroup')">
{{ t('action:turn-into-group') }}
</MenuItem>
<MenuItem accent="brand" icon="fa:trash" @click="emit('remove')">{{ t('action:delete-filter') }}</MenuItem>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<MenuItem accent="brand" icon="fa:trash" @click="emit('remove')">{{ t('action:delete-filter') }}</MenuItem>
<MenuItem accent="danger" icon="fa:trash" @click="emit('remove')">{{ t('action:delete-filter') }}</MenuItem>

Figma says it should be "danger" (even though it does not have a special class for now - and the menu's z-index is broken...)

<MenuItem accent="brand" @click="emit('remove', true)">
{{ t('action:move-filters-to-parent-group') }}
</MenuItem>
<MenuItem accent="brand" @click="emit('remove')">{{ t('action:delete-group') }}</MenuItem>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<MenuItem accent="brand" @click="emit('remove')">{{ t('action:delete-group') }}</MenuItem>
<MenuItem accent="danger" @click="emit('remove')">{{ t('action:delete-group') }}</MenuItem>

same as previous file

<MenuItem v-if="showChangeStateButton && !uiStore.isSmall" icon="action:change-state" class="change-state">
<MenuItem
v-if="showChangeStateButton && !uiStore.isSmall"
accent="brand"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a different accent, as discussed

<template>
<MenuItem
v-tooltip="!canDetachHost && detachHostErrorMessage"
accent="brand"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a different accent, as discussed

@@ -1,5 +1,5 @@
<template>
<MenuItem class="change-state" icon="action:change-state">
<MenuItem accent="brand" class="change-state" icon="action:change-state">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Change state" exception here too

@@ -1,5 +1,6 @@
<template>
<MenuItem
accent="brand"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
accent="brand"
accent="danger"
  • remove the disconnect class on this element
  • delete the .disconnect class at the bottom of this file

</MenuItem>

<MenuItem class="icon" icon="fa:arrow-right-from-bracket" @click="logout()">
<MenuItem accent="brand" class="icon" icon="fa:arrow-right-from-bracket" @click="logout()">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason the icon is white in the default state now (but ok on hover)...

@@ -1,5 +1,5 @@
<template>
<MenuItem icon="action:delete" :disabled="!canDeleteVifs" :busy="isDeletingVifs" @click="deleteVifs()">
<MenuItem accent="brand" icon="action:delete" :disabled="!canDeleteVifs" :busy="isDeletingVifs" @click="deleteVifs()">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<MenuItem accent="brand" icon="action:delete" :disabled="!canDeleteVifs" :busy="isDeletingVifs" @click="deleteVifs()">
<MenuItem accent="danger" icon="action:delete" :disabled="!canDeleteVifs" :busy="isDeletingVifs" @click="deleteVifs()">

<template>
<MenuItem
v-tooltip="areSomeVmsInExecution && t('selected-vms-in-execution')"
accent="brand"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
accent="brand"
accent="danger"

Comment on lines 30 to 34
<style lang="postcss" scoped>
.delete {
color: var(--color-danger-item-base);
}
</style>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants