Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Half-Shot
Copy link
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
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
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 ..

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