Skip to content

[Bug]: labels in stories are not SSR safe #27957

Description

@layershifter

Library

React Northstar / v0 (@fluentui/react-northstar)

System Info

N/A

Are you reporting Accessibility issue?

None

Reproduction

N/A

Bug Description

Library

React Components / v9 (@fluentui/react-components)

System Info

N/A

Are you reporting Accessibility issue?

None

Reproduction

N/A

Bug Description

Actual Behavior

SSR tests are failing

Expected Behavior

SSR tests are passing

Repro

  • Open scripts/test-ssr/src/commands/main.ts
  • Uncomment following
    const EXCLUDED_STORIES = [
    -  // TODO: re-enable ISSUE LINK
    - '**/react-datepicker-compat/**',
      // TODO: re-enable ISSUE LINK
      '**/react-toast/**',
      // Portals currently do not support hydration
      // https://github.com/facebook/react/issues/13097
      '**/react-portal/**',
      // https://github.com/microsoft/fluentui/issues/27338
      '**/react-table/stories/DataGrid/Virtualization.stories.tsx',
      '**/react-table/stories/Table/Virtualization.stories.tsx',
    ];
  • Run tests yarn workspace @fluentui/react-datepicker-compat test-ssr
  • Notice that tests are failing
  • The problem is with a Date used in a story:
    label={
    `Select a date out of bounds (minDate: ${minDate}, maxDate: ${maxDate}),` +
    ` type an invalid input, or leave the input empty and close the DatePicker.`
    }

Logs

N/A

Requested priority

High

Products/sites affected

N/A

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Logs

N/A

Requested priority

High

Products/sites affected

Fluent UI repo itself

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions