Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pro 6822 color picker broken #4809

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ did not actually use any noncompliant cookie names or values, so there was no vu
* The `renderPermalinks` and `renderImages` methods of the `@apostrophecms/rich-text` module now correctly resolve the final URLs of page links and inline images in rich text widgets, even when the user has editing privileges. Formerly this was mistakenly prevented by logic intended to preserve the editing experience. The editing experience never actually relied on the
rendered output.
* Search bar will perform the search even if the bar is empty allowing to reset a search.
* Fixes Color picker being hidden in an inline array schema field, also fixes rgba inputs going off the modal.

### Adds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@
<div v-if="!disableFields" class="apos-color__field">
<!-- rgba -->
<div class="apos-color__field--double">
<EdIn
<EditableContent
label="hex"
:value="hex"
@change="inputChange"
/>
</div>
<div class="apos-color__field--single">
<EdIn
<EditableContent
label="r"
:value="colors.rgba.r"
@change="inputChange"
/>
</div>
<div class="apos-color__field--single">
<EdIn
<EditableContent
label="g"
:value="colors.rgba.g"
@change="inputChange"
/>
</div>
<div class="apos-color__field--single">
<EdIn
<EditableContent
label="b"
:value="colors.rgba.b"
@change="inputChange"
/>
</div>
<div v-if="!disableAlpha" class="apos-color__field--single">
<EdIn
<EditableContent
label="a"
:value="colors.a"
:arrow-offset="0.01"
Expand Down Expand Up @@ -115,7 +115,7 @@ export default {
Saturation: saturation,
Hue: hue,
Alpha: alpha,
EdIn: editableInput,
EditableContent: editableInput,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just making in more readable

Checkboard: checkboard
},
mixins: [ colorMixin ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default {
}

.apos-color__input {
width: 100%;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes the rgba inputs not wanting to respect the flexed parent size

padding: 0;
border: 0;
outline: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
/>
</div>
</div>
<transition name="collapse">
<transition name="collapse" :duration="400">
<div v-show="item.open" class="apos-input-array-inline-body">
<AposSchema
:key="item._id"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.apos-schema {
padding-top: $spacing-base;
padding-bottom: $spacing-base;
padding-top: $spacing-base * 2;
padding-bottom: $spacing-base * 2;
}

:deep(.apos-field--array.apos-field--error-duplicate) {
Expand Down Expand Up @@ -253,9 +253,7 @@
}

.apos-input-array-inline-body {
overflow: hidden;
max-height: 999px;
padding: $spacing-base 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove the padding here to add it above to .apos-schema it allows the animation of the dropdown to not jump (padding still being here when finishing to close the dropdown).
It's more pleasing to the eye.

transition: all 400ms ease;

&.collapse-enter-from,
Expand All @@ -265,6 +263,7 @@

&.collapse-enter-active,
&.collapse-leave-active {
overflow: hidden;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We only need the overflow hidden during the animation. This way it's not the case when opened and the color picker can overflow.

transition: max-height 400ms ease;
}
}
Expand Down Expand Up @@ -307,7 +306,6 @@
@include apos-transition();

& {
overflow: hidden;
padding: 0;
border: 1px solid var(--a-base-9);
outline: 1px solid transparent;
Expand Down