Skip to content

Conversation

@fbeaudoincoveo
Copy link
Contributor

@fbeaudoincoveo fbeaudoincoveo commented Oct 20, 2025

AtomicResultNumber Component Specification

📝 Requirements

The atomic-result-number component renders the value of a numeric result field.

Functional requirements and constraints:

  • Must be in the Light DOM
  • Must validate its field prop (required, non-empty string) upon DOM connection and before updating, if needed.
  • Must render nothing when it cannot access the current language of its parent atomic-search-interface.
  • Must be able to format both numbers and string values than can be parsed to numbers.
  • Must use a number formatter with full localization support by default.
  • Must support an optional slotted formatter (atomic-format-number, atomic-format-currency, or atomic-format-unit) that takes precedence over the default number formatter.
  • Must remove itself from the DOM when its received value is null.
  • Must render the atomic-error component when its field prop is invalid.
  • Must render the atomic-error component when its received value cannot be parsed to a number.
  • Must render the atomic-error component when its formatter throws.
  • Must render the atomic-error component when rendered outside of an atomic-result-list.

♿ Accessibility

  • Must raise no accessibility issues in an AXE check.

⚡ Performance & Security

  • Must unregister its event listener when disconnected from the DOM.

⚠️ Risks and Challenges

  • Some error handling was added during the migration.

✅ Checklist

  • 🧪 The component is unit tested
  • 🧪 The component includes E2E tests
  • 🗑️ Old Cypress tests exclusive to the component are removed
  • 📖 The component is documented in storybook with an .mdx file
  • ♿ The component complies with the Web Content Accessibility Guidelines.
  • 🌐 All strings intended for humans or assistive technology must be localized with i18n.
  • 📦 The Lit component is exported in the appropriate index.ts and lazy-index.ts files.
  • 🎨 CSS parts are documented still accessible.
  • 🦥 Slotted Content, public methods and properties are documented
  • 🔄 The component outputs the same Angular output as before with Stencil
  • 🏷️ The component declares the component type in the HTMLElementTagNameMap

https://coveord.atlassian.net/browse/KIT-4974

@developer-experience-bot
Copy link
Contributor

developer-experience-bot bot commented Oct 20, 2025

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 255.7 255.7 0
commerce 369.5 369.5 0
search 427.4 427.4 0
insight 419.3 419.3 0
recommendation 266.5 266.5 0
ssr 421.7 421.7 0
ssr-commerce 386.7 386.7 0
ssr-commerce-next 387.9 387.9 0
ssr-next 422.4 422.4 0

@github-actions
Copy link

🔗 Scratch Orgs ready to test this PR:


hostConnected() {
this.currentProps = this.getProps();
if (this.host.error === null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm adding this because the ItemContextController is setting the error to null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I applied the recommendations from the prompt execution reports after running them, hence the changes in the prompts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants