From 33ab674a07fba5425655902fe0bc18dd2f679bf4 Mon Sep 17 00:00:00 2001 From: Bartek Szopka <83575+bartaz@users.noreply.github.com> Date: Tue, 4 Feb 2025 15:30:29 +0100 Subject: [PATCH 1/2] chore: Remove old Vanilla 2.0 related workarounds (#5012) * chore: Remove custom p-logo-link styles (from first snap flow) * chore: remove old Vanilla 2.0 workaround for code snippets * chore: Remove u-flex utility and its references * chore: Remove unnecessary z-index --- static/sass/_patterns_logo-links.scss | 95 --------------- static/sass/_snapcraft_release.scss | 2 - static/sass/_utilities_flex.scss | 7 -- static/sass/styles.scss | 11 -- templates/first-snap/install-snapcraft.html | 26 ++-- templates/publisher/_header.html | 125 -------------------- templates/publisher/_noscript.html | 13 -- 7 files changed, 10 insertions(+), 269 deletions(-) delete mode 100644 static/sass/_patterns_logo-links.scss delete mode 100644 static/sass/_utilities_flex.scss delete mode 100644 templates/publisher/_header.html delete mode 100644 templates/publisher/_noscript.html diff --git a/static/sass/_patterns_logo-links.scss b/static/sass/_patterns_logo-links.scss deleted file mode 100644 index 8eca51d3d1..0000000000 --- a/static/sass/_patterns_logo-links.scss +++ /dev/null @@ -1,95 +0,0 @@ -@mixin p-logo-link { - .p-logo-link { - border: 1px solid transparent; - border-radius: 2px; - display: block; - margin-top: 0; - - // override for Vanilla 2.0 adding border - // possibly we should revisit this styling at some point - .p-card__header { - border: 0; - padding: 0; - } - - img { - display: block; - margin: 0 auto; - } - - &:hover, - &.is-selected { - border-color: $color-mid-light; - text-decoration: none; - } - - &:visited { - color: inherit; - } - - // first snap flow details link styles - &.is-open { - border-bottom: 1px solid $color-mid-light; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - overflow: visible; - position: relative; - } - - // bordered arrow - &.is-open::after, - &.is-open::before { - border-style: solid; - content: ""; - display: block; - height: 0; - left: 100%; - position: absolute; - width: 0; - } - - &.is-open::after { - border-color: transparent transparent $color-x-light; - border-width: 0.75rem; - bottom: -1px; - left: 50%; - margin-left: -0.75rem; - } - - &.is-open::before { - border-color: transparent transparent $color-mid-light; - border-width: 0.75rem; - bottom: 0; - left: 50%; - margin-left: -0.75rem; - } - - // disable focus outline on open link to make border more visible - &.is-open:focus { - outline: none; - } - - &.is-disabled { - opacity: 0.6; - - &::after { - content: "Coming soon"; - display: block; - font-size: 0.875rem; - } - - &:hover { - border-color: transparent; - } - - img { - filter: grayscale(1); - } - } - } - - .p-logo-image { - align-items: center; - display: flex; - } -} diff --git a/static/sass/_snapcraft_release.scss b/static/sass/_snapcraft_release.scss index 5916d9f0b7..19f837ad7f 100644 --- a/static/sass/_snapcraft_release.scss +++ b/static/sass/_snapcraft_release.scss @@ -414,10 +414,8 @@ white-space: nowrap; } - // TODO[epic=vanilla]: LINK contextual menu .p-contextual-menu__dropdown { overflow: visible; // allow tooltips inside menu - z-index: 2; // workaround for https://github.com/canonical-web-and-design/vanilla-framework/issues/2577 .p-tooltip { display: block; diff --git a/static/sass/_utilities_flex.scss b/static/sass/_utilities_flex.scss deleted file mode 100644 index 4ca37d2dc1..0000000000 --- a/static/sass/_utilities_flex.scss +++ /dev/null @@ -1,7 +0,0 @@ -@mixin u-flex { - // There are several issues with using floats for layout in Vanilla 2.0 - // This utility tries to give tools to overcome some of them - .u-flex { - display: flex; - } -} diff --git a/static/sass/styles.scss b/static/sass/styles.scss index 3947666846..175fc55d4e 100644 --- a/static/sass/styles.scss +++ b/static/sass/styles.scss @@ -69,8 +69,6 @@ $color-social-icon-foreground: $color-light; @include vf-p-testimonial; @import "button-overrides"; @include button-overrides; -@import "patterns_logo-links"; -@include p-logo-link; @import "snapcraft_market_screenshots"; @include snapcraft-market-screenshots; @@ -141,8 +139,6 @@ $color-social-icon-foreground: $color-light; @include snapcraft-p-table; @import "utilities_no-limit"; @include u-no-limit; -@import "utilities_flex"; -@include u-flex; @import "utilities_disabled"; @include u-disabled; @import "utilities_text-wrap"; @@ -224,13 +220,6 @@ dl { text-overflow: ellipsis; } -// This should be removed once vanilla is upgraded to v2.22.2 -.p-code-snippet__block--icon.is-wrapped, -.p-code-snippet__block--numbered.is-wrapped, -.p-code-snippet__block.is-wrapped { - white-space: pre-wrap; -} - .p-modal__dialog { @media only screen and (min-width: $breakpoint-small) { min-width: 400px; diff --git a/templates/first-snap/install-snapcraft.html b/templates/first-snap/install-snapcraft.html index bd913e2d28..3605f26df9 100644 --- a/templates/first-snap/install-snapcraft.html +++ b/templates/first-snap/install-snapcraft.html @@ -8,28 +8,22 @@
by {{publisher_name}}
- {% endif %} -