microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.37k stars 2.72k forks source link

Conformance tests for triggers #21670

Open layershifter opened 2 years ago

layershifter commented 2 years ago

Recently we had various discussions around triggers and reached the agreement on how it should work:

Another point that we could cover that contract with conformance tests and enable them for components that use the trigger pattern. For an initial implementation the following scenarios should be covered.

Props merging

Props specified by a customer always win.

function App() {
  return (
    <Trigger>
      <button id="foo" aria-label="bar" />
    </Trigger>
  );
}

This should render following markup:

<button id="foo" aria-label="bar"></button>

Callback merging

Internal and user's callbacks should be merged.

function App() {
  return (
    <Trigger>
      <button onClick={() => console.log('foo') />
    </Trigger>
  );
}
miroslavstastny commented 2 years ago

This is needed as there are tests which are already copy&paste.

msft-fluent-ui-bot commented 1 year ago

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot commented 1 year ago

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

microsoft-github-policy-service[bot] commented 11 months ago

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

microsoft-github-policy-service[bot] commented 6 months ago

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.