appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.1k stars 3.69k forks source link

[Feature]: deprecation warning on widgets #12291

Closed somangshu closed 2 years ago

somangshu commented 2 years ago

Is there an existing issue for this?

Summary

We need to integrate a “deprecation” of widgets notification. The goal is:

We need to add a new flag deprecated: true to the widget configurations of the widget which has been deprecated. This will be a platform level change, followed by the widgets that need this property.

Why should this be worked on?

Today in Appsmith it's not possible to notify the developer of any widget depreciation so that they can take an action and avoid any breaking changes in their apps.

somangshu commented 2 years ago

3613 is related to this, We have two ways to move forward

We will move ahead based on the final call on the above.

somangshu commented 2 years ago

I found clean URL implement something new which felt relevant 👇

Screenshot 2022-03-29 at 1 14 22 PM Screenshot 2022-03-29 at 1 14 35 PM
somangshu commented 2 years ago

@rohitagarwal88 please look into this, Need you to take this forward

rohitagarwal88 commented 2 years ago

@momcilo-appsmith : Can you look into the design for the deprecation?

momcilo-appsmith commented 2 years ago

@rohitagarwal88 is this all we need:

  1. notification when it happens
  2. indicator that a widget on the canvas is deprecated?

Do we also need to show this for variants of a widget (e.g. number input in the input widget)?

rohitagarwal88 commented 2 years ago

@rohitagarwal88 is this all we need:

  1. notification when it happens: Yes
  2. indicator that a widget on the canvas is deprecated? Yes

Do we also need to show this for variants of a widget (e.g. number input in the input widget)? No

aswathkk commented 2 years ago

Related: #9014

somangshu commented 2 years ago

cc @vasanth-appsmith @rohitagarwal88 Additional context from a user. Screenshot 2022-04-19 at 12 45 31 PM

vasanthappsmith commented 2 years ago

cc @vasanth-appsmith @rohitagarwal88 Additional context from a user. Screenshot 2022-04-19 at 12 45 31 PM

Good one @somangshu Thanks. But we are not doing the upgrade widget right now correct?

vasanthappsmith commented 2 years ago

@rahulramesha Please check the design for this. Let me know if you have any questions. Figma

rahulramesha commented 2 years ago

@Pranay105 @jnikhila Need your help in deciding a warning message. For the deprecated widgets, we are currently planning to add the message, “There’s a newer version available. The current version will not be maintained.” This message might sound a bit stiff to the user. Can you guys suggest some alternatives or does this message sound good?

image

cc: @dilippitchika @vasanth-appsmith @rohitagarwal88

jnikhila commented 2 years ago

@rahulramesha , @dilippitchika , @rohitagarwal88 , @vasanth-appsmith

A couple of questions -

The base message can be as follows:

We urge you to update to a [NEW_VERSION] of [WIDGET_NAME]. The [CURRENT_VERSION] is [deprecated/discontinued] and will not be supported.

Based on whether the support is available for a stipulated time frame we can choose either deprecated or if no support is available then discontinued.

We can amend the message based on the above confirmations.

rohitagarwal88 commented 2 years ago

To answer your question @jnikhila

Hope that helps, do let me know if you have any other questions.

btsgh commented 2 years ago

Unable to test this as the message is not coming as per Discussion with @rohitagarwal88

rahulramesha commented 2 years ago

@btsgh This message only appears in the propertyPane of deprecated widgets. Unfortunately any new widgets that are added are not deprecated hence, it can't be seen. you can try testing in this application https://appsmith-git-deprecationwarning-get-appsmith.vercel.app/app/deprecated-warning-message-test/deprecated-widgets-6274de107c6b4e16b81a24a3/edit, This application has all the deprecated widgets,

btsgh commented 2 years ago

Thanks @rahulramesha .. Looked up the above application. I see these widgets in your app - Input widget, Select widget, Date picker widget, File Picker widget, MultiSelect widget, Form Button, Progress Bar, Circular Progress .. and when I click on each one, I see this message - Screenshot 2022-05-13 at 10.03.48 PM.png

Also, on adding any of the above widget newly, I do not see the message, which is the right behaviour as per your update above.

However, for the FormButton widget, if I add a new Form widget, and select the Submit or Reset button on it, I see the above message. As per your explanation above, the Submit and Reset buttons in the newly added Form widget should not show the deprecated message as they are newly added, is that right? Please let us know.

Also, do let us know if there is any other scenario that you would like us to test around this.

jnikhila commented 2 years ago

Thanks, @rohitagarwal88. Based on the confirmation we can use the message as follows:

Message One

Heading - Stay Up-to-date Message - A new version of the [WIDGET_NAME] widget is available. Upgrade to enjoy an enhanced experience. Message Two

Heading - Stay Up-to-date
 Message - A new version of the [WIDGET_NAME] widget is available. As you are using an older version that is deprecated, upgrade to a new version and enjoy an enhanced experience.

WIDGET_NAME to be populated on runtime.

CC: @rahulramesha @dilippitchika

@rahulramesha - added two flavours of message.

rahulramesha commented 2 years ago

@somangshu, we are currently adding deprecated warning to Form Button Widget as well. I was under the impression that it is already migrated. Need your confirmation if we should do that as Form Button Widget is not migrated yet.

rahulramesha commented 2 years ago

Thanks @jnikhila.

@rohitagarwal88 @dilippitchika does this sound good, should I move ahead with making changes to show @jnikhila's message instead?

rohitagarwal88 commented 2 years ago

@rahulramesha : Please go ahead with Message 1.

somangshu commented 2 years ago

@rahulramesha the form button widget is not yet deprecated, We have the open issue here > https://github.com/appsmithorg/appsmith/issues/3613

Once this change is in, We would like to create a V2 based on this discussion. Please let me know if you need more info here.

rahulramesha commented 2 years ago

@btsgh I have removed the deprecation warning for FormButtonWidget based on Above conversation.

image

@rohitagarwal88 @dilippitchika @jnikhila I have updated the warning to display message One. Please let me know if this requires any further changes.

btsgh commented 2 years ago

Tested the new message as per discussion above and all the widgets in the deprecated app shared above. Seems fine.

btsgh commented 2 years ago

Tested the following scenarios:

  1. On the deprecated app shared in the PR, all the deprecated widgets show the warning correctly.
  2. Newly added widgets do not show the warning.
  3. Tried a few old apps existing in the QA environment - (https://release.app.appsmith.com/applications - Testing Apps org)able to see the deprecated warning message on a couple of widgets here. Screenshot 2022-05-27 at 12 57 12 PM Screenshot 2022-05-27 at 12 57 06 PM Screenshot 2022-05-27 at 12 56 06 PM
jnikhila commented 2 years ago

@rohitagarwal88 - Could you please confirm, what user action is needed when the widget is deprecated? We can then amend the message accordingly.

jnikhila commented 2 years ago

@rohitagarwal88, @ramsaptami, @mohanarpit, @vasanth-appsmith, @AnaghHegde, @rahulramesha, @aswathkk

A few more messages that we can use:

Heading - Stay Up-to-date

Message1 - A new version of the [WIDGET_NAME] widget is available. You can drag a new [WIDGET_NAME] to upgrade. Please note that you’ll have to add bindings manually.

Message2 - You are using an older version of [WIDGET_NAME] that is deprecated. Please upgrade to a new version by dragging [WIDGET_NAME] on the canvas. Please note that you’ll have to add bindings manually.

Assumption: