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

Deprecate public interfaces which are used as UiFramework property types #807

Open
ignas-k opened this issue Apr 22, 2024 · 1 comment
Open
Labels
minor Changes in this PR requires creating a minor release react Issue related to React

Comments

@ignas-k
Copy link
Contributor

ignas-k commented Apr 22, 2024

Is your feature request related to a problem? Please describe.

As stated here, we have public interfaces which are only used as types for UiFramework property types e.g. FrameworkFrontstages, FrameworkToolSettings etc. Users have no use for these interfaces because their use is internal.

Describe the Solution you'd like

Deprecate public interfaces which are only used as types for UiFramework property types e.g. FrameworkFrontstages, FrameworkToolSettings etc.

@ignas-k ignas-k self-assigned this Apr 22, 2024
@ignas-k
Copy link
Contributor Author

ignas-k commented Apr 26, 2024

The benefits we would receive from this change:

  • Users could not some interfaces in unintended ways.
  • We could add new required properties to these interfaces.

Some ways this change could be achieved:

  • If we change the deprecated types to @internal it would cause confusion because developers would think these interfaces could be easily modified when in reality it is not the truth. These interfaces would still be 'public' because e.g. FrameworkBackstages interface is used by a public UiFramework. backstage property so it cannot be easily modified because it needs to follow support policy. So this solution would not work. We cannot have internal interfaces that are in fact public.
  • The alternative is to keep these interfaces documented as @public but remove them from the barrel file so they won't be exported. This is slightly better as developers would know it is public and could not make breaking changes. However, this method is also questionable because we need to consider whether that would make sense in documentation (having a documented interface that the user cannot access).
  • Final alternative is not to deprecate these interfaces but add a documentation tag which would tell users not to use the interface directly. Again questionable because that change does not bring any value to us.

This change is questionable because of its value, method to correctly implement the change and, in general, does it even make sense not to export interfaces which act as return types for properties, methods. Additionally, this change means we could deprecate all the interfaces that are only used as return types e.g. OpenChildWindowInfo. To track down and deprecate all of these interfaces would require a lot of time and effort.

@ignas-k ignas-k removed their assignment Apr 26, 2024
@GerardasB GerardasB added minor Changes in this PR requires creating a minor release react Issue related to React labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Changes in this PR requires creating a minor release react Issue related to React
Projects
None yet
Development

No branches or pull requests

2 participants