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

chore: release 1.37.0 #197

Merged
merged 25 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b1f92e1
internal(summary-control): add support for rendering count in details…
pheekus Jan 17, 2025
9cfa9fd
internal(async-list-control): add support for hiding when empty and r…
pheekus Jan 17, 2025
08e06b1
internal(resource-picker-control): change font size of actions
pheekus Jan 17, 2025
9b9f70c
fix: fix language strings not being updated sometimes in internal con…
pheekus Jan 17, 2025
687c333
feat(foxy-experimental-add-to-cart-builder): make custom options sect…
pheekus Jan 17, 2025
cd37072
fix(foxy-user-invitation-form): fix conditional visibility for Delete…
pheekus Jan 17, 2025
056fd0d
refactor(foxy-user-invitation-form): delay refresh by 1s to avoid hit…
pheekus Jan 17, 2025
1db2020
fix(foxy-gift-card-code-form): add missing imports
pheekus Jan 17, 2025
997edab
fix(foxy-gift-card-code-form): fix end date picker
pheekus Jan 17, 2025
bfa6954
feat(foxy-email-template-form): add support for overriding default su…
pheekus Jan 17, 2025
d8c88ec
fix(foxy-payments-api): fix hosted payment gateway url constructor
pheekus Jan 17, 2025
5f08d25
feat(foxy-transaction): add link to view web receipt
pheekus Jan 17, 2025
fa2ab4a
fix(foxy-item-category-form): fix shipping flat rate type options
pheekus Jan 20, 2025
892cd9e
internal(resource-picker-control): pass resource data to item url getter
pheekus Jan 20, 2025
a6e1d58
feat(foxy-gift-card-code-form): add support for linking cart item to …
pheekus Jan 20, 2025
06d3816
feat(foxy-gift-card-form): add support for linking to transaction pag…
pheekus Jan 20, 2025
5c89f7a
fix(foxy-webhook-form): use text controls for query and enpoint
pheekus Jan 20, 2025
5048471
internal(async-list-control): add support for setting filters externally
pheekus Jan 20, 2025
6de0a51
feat(foxy-gift-card-form): add support for settings Codes section fil…
pheekus Jan 20, 2025
fa04b9d
fix: use "Filters" instead of "Search" for Filters menu buttons
pheekus Jan 20, 2025
7c0a54e
internal(date-control): output long iso dates in api time zone
pheekus Jan 20, 2025
4e957d3
fix(foxy-admin-subscription-form): revert to iso-long format in start…
pheekus Jan 20, 2025
5309366
Revert "internal(date-control): output long iso dates in api time zone"
pheekus Jan 22, 2025
82ca662
internal(date-control): ensure iso-short value is always 10 character…
pheekus Jan 22, 2025
43ce36a
Revert "fix(foxy-admin-subscription-form): revert to iso-long format …
pheekus Jan 22, 2025
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
Original file line number Diff line number Diff line change
@@ -25,6 +25,11 @@ describe('InternalSummaryControl', () => {
expect(new Control()).to.have.property('layout', null);
});

it('has a reactive property "count" that defaults to null', () => {
expect(Control).to.have.deep.nested.property('properties.count', { type: Number });
expect(new Control()).to.have.property('count', null);
});

it('has a reactive property "open" that defaults to false', () => {
expect(Control).to.have.deep.nested.property('properties.open', { type: Boolean });
expect(new Control()).to.have.property('open', false);
@@ -48,6 +53,19 @@ describe('InternalSummaryControl', () => {
expect(control.renderRoot).to.include.text('Foo bar');
});

it('renders count in label if .count is set and layout is "details"', async () => {
const control = await fixture<Control>(html`
<foxy-internal-summary-control layout="details" label="Test"></foxy-internal-summary-control>
`);

expect(control.renderRoot).to.include.text('Test');
expect(control.renderRoot).to.not.include.text('Test (123)');

control.count = 123;
await control.requestUpdate();
expect(control.renderRoot).to.include.text('Test (123)');
});

it('renders helper text in default layout', async () => {
const control = await fixture<Control>(html`
<foxy-internal-summary-control></foxy-internal-summary-control>
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ export class InternalSummaryControl extends InternalEditableControl {
return {
...super.properties,
layout: {},
count: { type: Number },
open: { type: Boolean },
};
}
@@ -35,6 +36,8 @@ export class InternalSummaryControl extends InternalEditableControl {

layout: null | 'section' | 'details' = null;

count: number | null = null;

open = false;

renderLightDom(): void {
@@ -50,7 +53,7 @@ export class InternalSummaryControl extends InternalEditableControl {
@toggle=${(evt: Event) => {
const details = evt.currentTarget as HTMLDetailsElement;
this.open = details.open;
if (!evt.composed) this.dispatchEvent(new CustomEvent('toggle'));
if (!evt.composed && !evt.bubbles) this.dispatchEvent(new CustomEvent('toggle'));
}}
>
<summary class="select-none cursor-pointer focus-outline-none group">
@@ -63,7 +66,9 @@ export class InternalSummaryControl extends InternalEditableControl {
class="font-medium uppercase text-s tracking-wider flex items-center justify-between gap-s"
?hidden=${!this.label}
>
<span>${this.label}</span>
<span>
${this.label}${typeof this.count === 'number' ? ` (${this.count})` : ''}
</span>
<span
class="flex items-center justify-center transition-colors text-tertiary group-hover-text-body"
style="transform: scale(1.35)"