Skip to content
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

Add config option so more esoteric link types can be removed from list of default link #212

Closed
maxime-rainville opened this issue Feb 8, 2024 · 2 comments

Comments

@maxime-rainville
Copy link

maxime-rainville commented Feb 8, 2024

By default, all link types are available in a LinkField. If a developer wants to disable a specific Link type, they have to do so for each instance of LinkField.

There could be some situation where this is not advisable. e.g. A link type is meant to be an "abstract" parent class for child classes or an esoteric link type only makes sense in a specific context.

Acceptance criteria

  • A configuration flag is added to Link classes specifying if they should show by default in LinkField.
  • Root Link class can not be enabled via this API no matter what.
    • All other built-in Link subclasses are enabled by default.
  • Disabling a Link classes prevent it from showing as an option in a vanilla link field.
  • Disabled Link class can be added back to specific LinkField instance via the setAllowedTypes method.
  • The feature is documented in the developer docs.

PR

@GuySartorelli
Copy link
Member

GuySartorelli commented Feb 8, 2024

Link is disable by default. All other built-in Link subclasses are enabled by default.

I think Link should just be explicitly excluded at all times. This makes it both easier to implement this config flag in a sensible way, and means people won't go "Ooh I can turn Link on" and have a non-funcitonal link implementation that doesn't actually link to anything.

@maxime-rainville maxime-rainville changed the title Add config option so more esoteric link type can be removed from list of default link Add config option so more esoteric link types can be removed from list of default link Feb 11, 2024
@emteknetnz emteknetnz self-assigned this Feb 13, 2024
@emteknetnz emteknetnz removed their assignment Feb 13, 2024
@sabina-talipova
Copy link
Contributor

PR's merged. Task is completed.

@sabina-talipova sabina-talipova removed their assignment Feb 14, 2024
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

No branches or pull requests

4 participants