Skip to content

Update custom component logic to always return a hint.#30321

Closed
Half-Shot wants to merge 2 commits intodevelopfrom
hs/fix-can-download-module-hints
Closed

Update custom component logic to always return a hint.#30321
Half-Shot wants to merge 2 commits intodevelopfrom
hs/fix-can-download-module-hints

Conversation

@Half-Shot
Copy link
Copy Markdown
Member

Successor to #30320

This changes the modules custom components API to always the expected hints, filling in with defaults where a renderer does not provide expected values.

Needs playwright tests.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

Copy link
Copy Markdown
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

I'm not sure if this is better, as it happens after a Promise which may cause a visual flicker where one can be avoided

@Half-Shot
Copy link
Copy Markdown
Member Author

I'm not sure if this is better, as it happens after a Promise which may cause a visual flicker where one can be avoided.

Yea, unsure. The intention is that by moving the defaults to the module layer, we don't need to replicate those defaults to every consumer of the hints. The alternative being I suppose that we change the type to be () => Promise<boolean>|boolean ..

@Half-Shot
Copy link
Copy Markdown
Member Author

I don't think I'm progressing this for the moment.

@Half-Shot Half-Shot closed this Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants