From c89002f1b80e5f64f306beb3565cee8f09c15d8e Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Thu, 14 Nov 2024 16:00:18 +0100 Subject: [PATCH] [web] Migrate TPR promotions and form to BS5 (#21810) * Update TPR promotions to BS5 * Remove unused class names * Add responsive visibility in BS5 * Fix `OLFormControl` as `OLFormSelect` With this update, it fixes the Select when importing from Mendeley or Zotero, in BS3 and BS5 * Use spacing variables in SCSS GitOrigin-RevId: 8dd0e52a1674114bb3dc38fc4e3958a9c17ad5ac --- .../ui/components/ol/ol-form-control.tsx | 1 + .../stylesheets/bootstrap-5/modules/all.scss | 1 + .../modules/third-party-references.scss | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 services/web/frontend/stylesheets/bootstrap-5/modules/third-party-references.scss diff --git a/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx b/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx index 290d48fa5d..08ebd7e1ad 100644 --- a/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx +++ b/services/web/frontend/js/features/ui/components/ol/ol-form-control.tsx @@ -65,6 +65,7 @@ const OLFormControl: BsPrefixRefForwardingComponent< prepend: rest.prepend, size: rest.htmlSize, 'main-field': rest['main-field'], + children: rest.children, ...bs3Props, } diff --git a/services/web/frontend/stylesheets/bootstrap-5/modules/all.scss b/services/web/frontend/stylesheets/bootstrap-5/modules/all.scss index 2b0d7d7ed5..76d624f9cf 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/modules/all.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/modules/all.scss @@ -1,2 +1,3 @@ +@import 'third-party-references'; @import 'symbol-palette'; @import 'writefull'; diff --git a/services/web/frontend/stylesheets/bootstrap-5/modules/third-party-references.scss b/services/web/frontend/stylesheets/bootstrap-5/modules/third-party-references.scss new file mode 100644 index 0000000000..b8aa8bfd82 --- /dev/null +++ b/services/web/frontend/stylesheets/bootstrap-5/modules/third-party-references.scss @@ -0,0 +1,29 @@ +@keyframes slide-in { + 0% { + transform: translateY(25%); + opacity: 0; + bottom: var(--spacing-05); + } + + 100% { + transform: translateY(0); + opacity: 1; + bottom: var(--spacing-06); + } +} + +.fade-slide-in { + opacity: 0; + transition: opacity 0.3s ease; /* Smooth opacity transition */ + animation: slide-in 0.3s ease-in-out forwards; + animation-delay: 300ms; +} + +.tpr-editor-prompt-container { + position: absolute; + z-index: 1; + bottom: var(--spacing-06); + right: var(--spacing-06); + width: 90%; + max-width: 512px; +}