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

[Feature] When the version is released, the front-end prompts the user to refresh #1078

Closed
2 tasks done
wxyn opened this issue Jul 10, 2023 · 1 comment
Closed
2 tasks done
Labels
enhancement New feature or request type=NewFeature

Comments

@wxyn
Copy link
Contributor

wxyn commented Jul 10, 2023

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Problem Description

After each version release, if users do not refresh the page, the browser may still cache the content of the previous version, which will affect users' normal use of DSS.
The current user is not clear about the features and usage of each version release. They hope to use version release prompts to guide users to understand the newly added and optimized features and defects fixed in each version.

Description

Version release prompt
If the version number cached by the user's current browser does not match the version number of the server, a prompt will pop up.
Scope of prompt occurrence: Any page in DSS (if it does not jump out of DSS, the prompt page will pop up, such as in Scriptis, homepage, DSS workflow, management console)
When the prompt appears: When the user switches pages, it will pop up (such as switching from Scriptis to the management console, switching from the management console to the homepage, etc.).
--Prompt when switching pages: such as switching to the homepage from Scriptis (if the iframe is moved, it will change once).
image

interactive
When the user clicks "Update now", the front-end automatically refreshes the page for the user to obtain the new version.
Reason for forcing the user to refresh immediately: There is no situation that will trigger the user to edit the content unsaved, the content is lost, because the user is first asked to save the content being edited before cutting the tab.
Popup Content

  1. Click [View more version features] to open the version release record document in the Knowledge base on the new tab page.
  2. Users click the function points listed in the version function introduction, such as "[Add] You can provide alarm notification when Scriptis tasks are configured", and the usage instructions of the corresponding functions will be opened in the new tab page (Function description documents will be provided in the background).
    other
    Add a new display of 'Dynamics and Announcements', which displays the' DSS Function Release Record 'knowledge base link. Click the link to expand on the new tab page.
    image

Use case

No response

solutions

  1. When users switch pages, the front-end will detect the front-end feature files on the server, and if any changes are found in the feature files, it indicates that a new front-end version has been released.
  2. If the front-end detects the release of a new version, it requests the back-end interface to obtain the version release content.
  3. When publishing, the backend will upload the knowledge base related to the published content to GitBook and configure it on the server. When the front-end requests to publish content, the back-end returns a list of published content for this version.
  4. Users can click on the function list on the published content to enter the function description. Simultaneously clicking the Update Now button can trigger a front-end browser refresh to update front-end resources.

When deploying dss, use the dss interface:
Interface Path: /api/rest_j/v1/dss/framework/workspace/getReleaseNote
The demo data is as follows:

{
  "method": null,
  "status": 0,
  "message": "获取侧边栏成功",
  "data": {
    "releaseNote": [
      {
        "name": "DSSv1.1.9releaseNote",
        "title": "DSSv1.1.9版本功能介绍",
        "contents": [
          {
            "name": "[feature1] support xxx",
            "title": "【新增】你可以为scriptis运行中的任务配置完成时告警通知",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/你可以为scriptis运行中的任务配置完成时告警通知.html",
            "urlType": 1
          },
          {
            "name": "[feature2] support xxx",
            "title": "【新增】为用户提供编辑锁主动解锁按钮",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/为用户提供编辑锁主动解锁按钮.html",
            "urlType": 1
          }
        ]
      },
      {
        "name": "new feature",
        "title": "快速体验新功能",
        "contents": [
          {
            "name": "[feature1] kill xxx",
            "title": "kill引擎",
            "url": "/workspaceManagement/enginelist?workspaceId=251",
            "urlType": 0
          }
        ]
      }
    ],
   "version":"v1.1.11",
   "releaseNoteUrl":"_book/版本动态与公告/v1.1.11.html"
  }
}

Return data:
image

When deploying scriptis separately, use the scriptis interface:
Interface Path: /api/rest_j/v1/dss/scriptis/getReleaseNote
The demo data is as follows:

{
  "method": null,
  "status": 0,
  "message": "获取侧边栏成功",
  "data": {
	"version":"v1.1.11",
	"releaseNoteUrl":"_book/版本动态与公告/v1.1.11.html",
    "releaseNote": [
      {
        "name": "scriptis1.1.9 releaseNote",
        "title": "scriptisv1.1.9版本功能介绍",
        "contents": [
          {
            "name": "[feature1] support xxx",
            "title": "【新增】你可以为scriptis运行中的任务配置完成时告警通知",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/你可以为scriptis运行中的任务配置完成时告警通知.html",
            "urlType": 1
          },
          {
            "name": "[feature2] support xxx",
            "title": "【新增】为用户提供编辑锁主动解锁按钮",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/为用户提供编辑锁主动解锁按钮.html",
            "urlType": 1
          }
        ],
      },
      {
        "name": "new feature",
        "title": "快速体验新功能",
        "contents": [
          {
            "name": "[feature1] kill xxx",
            "title": "kill引擎",
            "url": "/workspaceManagement/enginelist?workspaceId=251",
            "urlType": 0
          }
        ]
      }
    ]
  }
}

Return data:
image

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@wxyn wxyn added the enhancement New feature or request label Jul 10, 2023
@zqburde zqburde added this to To do in DataSphereStudio1.1.2 via automation Aug 9, 2023
@zqburde
Copy link
Contributor

zqburde commented Aug 9, 2023

Add it in DSS1.1.2

@zqburde zqburde moved this from To do to Done in DataSphereStudio1.1.2 Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type=NewFeature
Development

No branches or pull requests

3 participants