Skip to content

Commit

Permalink
Fixing Popover Attachment in the Shoot List (gardener#1671)
Browse files Browse the repository at this point in the history
* update yarn and floating ui

* fixes gardener#1650
  • Loading branch information
holgerkoser authored Jan 11, 2024
1 parent 0eda4ac commit d9ea186
Show file tree
Hide file tree
Showing 21 changed files with 324 additions and 182 deletions.
16 changes: 8 additions & 8 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
262 changes: 131 additions & 131 deletions .yarn/releases/yarn-3.6.3.cjs → .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ packageExtensions:
vue: "*"
vite@*:
dependencies:
"@esbuild/linux-arm64": "0.18"
"@esbuild/linux-x64": "0.18"
"@esbuild/linux-arm64": 0.18
"@esbuild/linux-x64": 0.18

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
Expand All @@ -57,4 +57,4 @@ plugins:

pnpEnableEsmLoader: true

yarnPath: .yarn/releases/yarn-3.6.3.cjs
yarnPath: .yarn/releases/yarn-3.6.4.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ SPDX-License-Identifier: Apache-2.0

<template>
<g-popover
v-if="shootControlPlaneHighAvailabilityFailureTolerance"
v-model="internalValue"
:disbaled="!shootControlPlaneHighAvailabilityFailureTolerance"
toolbar-title="Control Plane High Availability"
:toolbar-color="color"
>
<template #activator="{ props }">
<v-chip
v-if="shootControlPlaneHighAvailabilityFailureTolerance"
v-bind="props"
variant="tonal"
:size="size"
:color="color"
class="cursor-pointer ml-1"
class="cursor-pointer"
>
{{ shootControlPlaneHighAvailabilityFailureTolerance }}
</v-chip>
Expand Down Expand Up @@ -66,12 +68,26 @@ import { some } from '@/lodash'

export default {
mixins: [shootItem],
inject: [
'activePopoverKey',
],
props: {
size: {
type: [String, Number],
},
},
computed: {
popoverKey () {
return `g-control-plane-hig-availability-tag:${this.shootMetadata.uid}`
},
internalValue: {
get () {
return this.activePopoverKey === this.popoverKey
},
set (value) {
this.activePopoverKey = value ? this.popoverKey : ''
},
},
zoneSupported () {
const seeds = this.seedsByCloudProfileName(this.shootCloudProfileName)
return some(seeds, ({ data }) => data.zones?.length >= 3)
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/GShootCustomField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SPDX-License-Identifier: Apache-2.0

<template>
<g-popover
v-model="popover"
:toolbar-title="name"
:toolbar-color="color"
placement="right"
Expand Down Expand Up @@ -174,5 +175,10 @@ export default {
type: Boolean,
},
},
data () {
return {
popover: false,
}
},
}
</script>
21 changes: 17 additions & 4 deletions frontend/src/components/GShootStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
<template>
<div class="d-flex align-center">
<g-popover
v-model="popover"
v-model="internalValue"
:toolbar-title="toolbarTitle"
:toolbar-color="color"
:placement="popperPlacement"
Expand All @@ -16,7 +16,7 @@ SPDX-License-Identifier: Apache-2.0
<div class="d-flex align-center">
<v-tooltip
location="top"
:disabled="popover"
:disabled="internalValue"
>
<template #activator="{ props: tooltipProps }">
<v-btn
Expand Down Expand Up @@ -215,7 +215,10 @@ export default {
GShootMessageDetails,
},
mixins: [shootItem],
inject: ['mergeProps'],
inject: [
'mergeProps',
'activePopoverKey',
],
props: {
popperKey: {
type: String,
Expand All @@ -231,11 +234,21 @@ export default {
},
data () {
return {
popover: false,
retryingOperation: false,
}
},
computed: {
popoverKey () {
return `g-shoot-status:${this.shootMetadata.uid}`
},
internalValue: {
get () {
return this.activePopoverKey === this.popoverKey
},
set (value) {
this.activePopoverKey = value ? this.popoverKey : ''
},
},
showProgress () {
return this.operationState === 'Processing'
},
Expand Down
34 changes: 23 additions & 11 deletions frontend/src/components/GStatusTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
<template>
<div v-if="visible">
<g-popover
v-model="popover"
v-model="internalValue"
:placement="popperPlacement"
:disabled="!condition.message"
:toolbar-title="popperTitle"
Expand Down Expand Up @@ -35,7 +35,7 @@ SPDX-License-Identifier: Apache-2.0
:activator="$refs.tagChipRef"
location="top"
max-width="400px"
:disabled="popover"
:disabled="internalValue"
>
<div class="font-weight-bold">
{{ chipTooltip.title }}
Expand Down Expand Up @@ -69,7 +69,7 @@ SPDX-License-Identifier: Apache-2.0
:error-descriptions="errorDescriptions"
:last-transition-time="condition.lastTransitionTime"
:secret-binding-name="secretBindingName"
:namespace="namespace"
:namespace="shootMetadata.namespace"
/>
</g-popover>
</div>
Expand Down Expand Up @@ -97,6 +97,9 @@ export default {
components: {
GShootMessageDetails,
},
inject: [
'activePopoverKey',
],
props: {
condition: {
type: Object,
Expand All @@ -105,25 +108,34 @@ export default {
secretBindingName: {
type: String,
},
namespace: {
type: String,
},
popperPlacement: {
type: String,
},
staleShoot: {
type: Boolean,
},
},
data () {
return {
popover: false,
}
shootMetadata: {
type: Object,
default () {
return { uid: '' }
},
},
},
computed: {
...mapState(useAuthnStore, [
'isAdmin',
]),
popoverKey () {
return `g-status-tag[${this.condition.type}]:${this.shootMetadata.uid}`
},
internalValue: {
get () {
return this.activePopoverKey === this.popoverKey
},
set (value) {
this.activePopoverKey = value ? this.popoverKey : ''
},
},
popperTitle () {
if (this.staleShoot) {
return 'Last Status'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/GStatusTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-License-Identifier: Apache-2.0
:condition="condition"
:popper-placement="popperPlacement"
:secret-binding-name="shootSecretBindingName"
:namespace="shootNamespace"
:shoot-metadata="shootMetadata"
:stale-shoot="isStaleShoot"
/>
</div>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/ShootDns/GDnsProvider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SPDX-License-Identifier: Apache-2.0

<template>
<g-popover
v-model="popover"
:toolbar-title="secretName"
>
<template #activator="{ props }">
Expand Down Expand Up @@ -106,6 +107,11 @@ export default {
required: false,
},
},
data () {
return {
popover: false,
}
},
computed: {
dnsProviderDescriptions () {
const descriptions = []
Expand Down
22 changes: 19 additions & 3 deletions frontend/src/components/ShootMessages/GShootMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ SPDX-License-Identifier: Apache-2.0

<template>
<g-popover
v-if="visible"
v-model="popover"
v-model="internalValue"
:disabled="!visible"
:toolbar-title="statusTitle"
:toolbar-color="overallColor"
content-text-class="pa-0"
>
<template #activator="{ props }">
<g-action-button
v-if="visible"
v-bind="props"
:icon="icon"
:color="overallColor"
Expand Down Expand Up @@ -87,7 +88,11 @@ export default {
GMaintenanceStatusMessage,
},
mixins: [shootItem],
inject: ['mainContainer', 'logger'],
inject: [
'mainContainer',
'logger',
'activePopoverKey',
],
props: {
small: {
type: Boolean,
Expand Down Expand Up @@ -115,6 +120,17 @@ export default {
...mapState(useAuthzStore, [
'canPatchShoots',
]),
popoverKey () {
return `g-shoot-messages:${this.shootMetadata.uid}`
},
internalValue: {
get () {
return this.activePopoverKey === this.popoverKey
},
set (value) {
this.activePopoverKey = value ? this.popoverKey : ''
},
},
visible () {
return !this.isShootMarkedForDeletion && this.shootMessages.length
},
Expand Down
27 changes: 24 additions & 3 deletions frontend/src/components/ShootWorkers/GWorkerGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SPDX-License-Identifier: Apache-2.0

<template>
<g-popover
v-model="internalValue"
:toolbar-title="workerGroup.name"
placement="bottom"
>
Expand Down Expand Up @@ -33,13 +34,13 @@ SPDX-License-Identifier: Apache-2.0
value="overview"
class="text-caption text-medium-emphasis"
>
Overview
OVERVIEW
</v-tab>
<v-tab
value="yaml"
class="text-caption text-medium-emphasis"
>
Yaml
YAML
</v-tab>
</v-tabs>
<v-card-text>
Expand Down Expand Up @@ -364,7 +365,10 @@ export default {
GVendorIcon,
GCodeBlock,
},
inject: ['yaml'],
inject: [
'yaml',
'activePopoverKey',
],
props: {
modelValue: {
type: [String, Number],
Expand All @@ -375,6 +379,12 @@ export default {
cloudProfileName: {
type: String,
},
shootMetadata: {
type: Object,
default () {
return { uid: '' }
},
},
},
emits: [
'update:modelValue',
Expand All @@ -385,6 +395,17 @@ export default {
}
},
computed: {
popoverKey () {
return `g-worker-group[${this.workerGroup.name}]:${this.shootMetadata.uid}`
},
internalValue: {
get () {
return this.activePopoverKey === this.popoverKey
},
set (value) {
this.activePopoverKey = value ? this.popoverKey : ''
},
},
machineType () {
const machineTypes = this.machineTypesByCloudProfileName({ cloudProfileName: this.cloudProfileName })
const type = get(this.workerGroup, 'machine.type')
Expand Down
Loading

0 comments on commit d9ea186

Please sign in to comment.