UI5 / UI5/webcomponents

document `ssr-dom-shim` for test envs using jsdom

Open
#10,980 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation Medium Prio TOPIC Core
Dominant language
TypeScript
Stars
1.8k
Forks
285
Avg merge
3d 2h
Merged PRs (30d)
59

Description

Issue Description

In jsdom many APIs used by ui5-webcomponents and ui5-webcomponents-react aren't supported. If the test environment uses "node", then the DOM shim is applied automatically, but this is not always the case and can therefore lead to confusion.

E.g. in this issue, the author uses a different env than "node" and therefore has to import the shim manually.

In my opinion it makes sense adding a section to the documentation regarding the shim. This way it's also easier for us processing issues, as we could just refer to the documentation.

First, I wanted to create a section in our (UI5WCR) docs, but as this is not only related to React, it's probably better to outline this in the ui5-webcomponents docs. What do you think?

Issue Type
  • Documentation is unclear
  • Documentation is incorrect
  • Documentation is missing
  • Other

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/base/package.json#L24 and the linked jsdom-related issue to confirm when the shim is applied automatically. Locate the appropriate ui5-webcomponents documentation section and document the node environment behavior, why other test environments may need the shim manually, and how users should recognize the correct setup.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, testing-qa
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.