Skip to content

Cookie banner v1#293

Merged
mjbp merged 10 commits intomasterfrom
feature/mick/187-cookie-banner
Mar 3, 2025
Merged

Cookie banner v1#293
mjbp merged 10 commits intomasterfrom
feature/mick/187-cookie-banner

Conversation

@mjbp
Copy link
Copy Markdown
Collaborator

@mjbp mjbp commented Feb 20, 2025

Resolves #282.

  • sweep of codebase to elimate dead code, run linting, fix any non-breaking niggles or annoyances
  • sweep of docs
  • clean-up example
  • sweep of tests
  • update store to standarise
  • publish src folder to npm

@mjbp mjbp linked an issue Feb 20, 2025 that may be closed by this pull request
Copy link
Copy Markdown

@catvine-stormid catvine-stormid left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉

Only a few tiny nitpicky comments, which may or may not be needed, so overall looks ready to go.

},
bannerTemplate(model){
return `<section role="dialog" aria-live="polite" aria-label="Cookies" class="${model.classNames.banner}">
return `<section role="region" aria-live="polite" aria-label="Cookies" class="${model.classNames.banner}">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The default banner container has been changed to a <div> element with role="region" attribute elsewhere throughout the code, rather than a <section> (README, defaults.js file). Is it worth updating here too for consistency?

expect(document.querySelector(`.${defaults.classNames.banner}`).getAttribute('role')).toEqual('region');
});

it('The banner should have be polite aria live region', async () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nitpicking here! But seems to be a small typo, might be clearer to say "The banner should be a polite aria live region"?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is in regards to the test starting on line 78, just for clarification.

getState: Store.getState,
getState: store.getState,
showBanner(cb) {
showBanner(Store)(cb);
Copy link
Copy Markdown

@catvine-stormid catvine-stormid Feb 21, 2025

Choose a reason for hiding this comment

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

Culling of the capital letters everywhere! Looks much tidier in all lowercase, I have to say. Good stuff :)

@mjbp mjbp merged commit fac80ea into master Mar 3, 2025
1 check passed
@mjbp mjbp deleted the feature/mick/187-cookie-banner branch March 3, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cookie banner > v1

2 participants