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

UI: Deprecate widget mode for status bar #3870

Merged
merged 16 commits into from
Jul 26, 2022

Conversation

raplemie
Copy link
Contributor

@raplemie raplemie commented Jun 27, 2022

StatusBarFields isInFooterMode deprecation

Part of itwin/itwinjs-backlog#190

Similar to #3843 , but for isInFooterMode prop.

Deprecated the following:

StatusFieldProps.isInFooterMode

This should be considered always true in most places where this is used as the Widget mode will be removed.

withStatusFieldProps

Only provides the StatusFieldProps to components, which this PR makes all deprecated. The HOC is still used by different UIProviders status bars for the time being. Finding a fix to use "either" of the HOC or the context would not give much benefit at this point, and may cause double renders on context change most of the time, so I kept it as is for now.

Removed most of its use otherwise.

withMessageCenterFieldProps

On top of most unused StatusFieldProps to the MessageCenter component, this was also providing the targetRef prop, which have been deprecated by using MessageManager.registerAnimateOutToElement to result in the same behavior. Kept in the UIProvides as the withStatusFieldProps above.

Remove most of its use.

ConditionalField

This component now only make "conditions" on the deprecated StatusFieldProps which will all be removed, in particular the isInFooterMode, so I made this component deprecated as well as it do not serves any purposes anymore.

FooterModeField

This component only reason is to render it's children if isInFooterMode is true, so I removed it. (Only internal use of ConditionalField above)

FrontstageProps

This interface is used by Frontstage and FrontstageDef, and is already handling true as its default value, it was only marked @deprecated but no further changes were done.

ContentLayout

This component received the isInFooterMode prop, but wasnt actually using it (bug ?) so I only marked it deprecated as well.

Remaining work

* withMessageCenterFieldProps is the only HOC remaining for this issue, #3573 will effectively remove most of it's implementation and remove the need for the HOC as well, the use should be removed and marked deprecated once the PR is completed.

resolves itwin/itwinjs-backlog#190

@raplemie raplemie requested a review from a team as a code owner June 27, 2022 20:43
@raplemie raplemie self-assigned this Jun 29, 2022
@raplemie raplemie changed the title UI: Deprecate is in footer mode for fields UI: Deprecate widget mode for status bar Jun 29, 2022
@raplemie raplemie merged commit 0dfde70 into master Jul 26, 2022
@raplemie raplemie deleted the raplemie/deprecateIsInFooterModeForFields branch July 26, 2022 15:55
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