Skip to content

Filter out invalid Components #2253

Description

@skjnldsv

Problem

  • To prevent developers from adding components that does NOT fit Nextcloud standards, we prevent some to be rendered if they are not official ones.
  • It create issues when we want to wrap said component:
    <Actions>
      <ActionInput />  <!-- rendered -->
      <ActionButton /> <!-- rendered -->
      <Wrapper>
      	<ActionButton /> <!-- NOT rendered -->
      </Wrapper>
    </Actions>
    Even if the Wrapper is just rendering a valid Action.

Temp solution

Questions

  • But it still bring back the debate whether enforcing is really such a wanted feature
  • And if so, what approach should we take. Any component could theoretically set itself with a valid name and be rendered too 🤷

Proposals:

  • We stop doing this and we just check if devs do bad things with it
  • We use css to hide the bad entries. Since we scope, we have a unique SCOPE ID that matches the library's build time. Since wrapping such components will still display them properly in the dom:
    image
    then we could hide all of those that does NOT match the library scope, or something like that 🤔

I don't have strong preferences anymore. We don't have time reviewing every component created by devs, so 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionNeed advices, opinions or ideas on this topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions