Skip to content

Conversation

@Westbrook
Copy link
Contributor

Description

A first iteration of event documentation in non-element docs pages. All info, no style... so, happy to take notes if there was something easily attainable that was more informative here. We need to expand on our ability to document non-element content, but I'm not sure where to take this right now. This hopefully gets the information into the world, and we can revisit this page (and bundle/base/styles/etc.) soon.

Related Issue

fixes #1360

Motivation and Context

Ensure users know the capabilities made available to them by our APIs.

Screenshots (if appropriate):

https://westbrook-overlay-events--spectrum-web-components.netlify.app/components/overlay

Types of changes

  • docs

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Westbrook Westbrook added Component: Overlay Component: Documentation Issues or PRs involving changes to docs or docs website. Component prefix is for Jira integration. labels Apr 15, 2021
@Westbrook Westbrook force-pushed the westbrook/overlay-events branch from 4508349 to c493a80 Compare April 15, 2021 13:27

### Events

The work to both open and close an overlay is asyncronous. This asyncrony is surfaced into the application via DOM events dispatched from the `trigger` element of your overlay. An `sp-opened` event will be dispatched once the overlay has completed all of the work involved in opening an overlay, and an `sp-closed` event will be dispatched onced the overlay has finished closing. In both cases the dispatched event will include a `detail` property with an `interaction: TriggerInteractions` key to support associating the event/overlay with its originating `interaction`.
Copy link
Member

Choose a reason for hiding this comment

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

asynchronous/asynchrony are misspelled.

I would also maybe reword " An sp-opened event will be dispatched once the overlay has completed all of the work involved in opening an overlay" to "An sp-opened event will be dispatched once the overlay has done the work to open an overlay" to make it a little less wordy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool. Took the reduction a little further in that sentence, but great instinct.

@Westbrook Westbrook force-pushed the westbrook/overlay-events branch from c493a80 to 5dabb1c Compare April 21, 2021 00:31
Copy link
Member

@najikahalsema najikahalsema left a comment

Choose a reason for hiding this comment

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

Looks great!

@Westbrook Westbrook merged commit ab7095f into main Apr 21, 2021
@Westbrook Westbrook deleted the westbrook/overlay-events branch April 21, 2021 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Documentation Issues or PRs involving changes to docs or docs website. Component prefix is for Jira integration. Component: Overlay

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[overlay] Include event docs for imperative API.

3 participants