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

feat(client): add new variable named 'URL search params' and support link action #4506

Merged
merged 55 commits into from
Jun 4, 2024

Conversation

zhangzhonghe
Copy link
Contributor

@zhangzhonghe zhangzhonghe commented May 28, 2024

close T-4367
close T-4368

Unit tests:

  • Override the code in the Link button that converts the value entered by the user into a query string.
  • Override the code in the variable that converts the URL query string into the variable context

E2E:

  • Measure a basic and complete process, which consists of: 1. full parameter input on the Link side (jumping to the current page); 2. data scope is normal; 3. data is re-requested after clicking a different Link button.

Add new variable

Add a new variable called "URL search params".

image

How to use

This variable will only work if there is a query string in the URL of the page, otherwise it will be disabled.

image

Filter form fields support setting default values

image

Add new action named 'Link'

This action supports configuring the URL of the page to jump to.

e3b3f361-6e7c-4f0c-b9b0-89ca8e5155dc

Copy link

height bot commented May 28, 2024

This pull request has been linked to and will mark 2 tasks as "Done" when merged:


This pull request has also been linked to 5 additional tasks:

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@zhangzhonghe zhangzhonghe removed the need test The PR has missing test cases. label Jun 2, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@zhangzhonghe zhangzhonghe merged commit f66edb5 into main Jun 4, 2024
5 checks passed
@zhangzhonghe zhangzhonghe deleted the T-4367 branch June 4, 2024 12:57
Copy link

github-actions bot commented Jun 4, 2024

Tests results for "E2E"

12 flaky ⚠️ [chromium] › plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts:21:7 › auth › register
⚠️ [chromium] › plugins/@nocobase/plugin-file-manager/src/client/__e2e__/createLocalStorage.test.ts:15:7 › file manager › add new local storage
⚠️ [chromium] › plugins/@nocobase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesFormulaEngine.test.ts:197:5 › Collection event Add Data Trigger, Formula engine, determines that the trigger node single line text field variable is not equal to an equal constant, fails.
⚠️ [chromium] › core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/lazyLoadAssociationFields.test.ts💯7 › association fields › should be possible to change the value of the association field normally
⚠️ [chromium] › plugins/@nocobase/plugin-gantt/src/client/__e2e__/drag.test.ts:13:5 › drag and adjust start time, end time, and progress
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › TableActionInitializers & GanttActionInitializers & MapActionInitializers › TableActionInitializers should add bulk update
⚠️ [chromium] › plugins/@nocobase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoFormulaEngine.test.ts:386:5 › Collection event Add Data Trigger, determines that the trigger node single line text field variable is not equal to an unequal constant, passes.
⚠️ [chromium] › plugins/@nocobase/plugin-workflow-action-trigger/src/client/__e2e__/configuration2.test.ts:67:7 › Configuration Page Path Jump Workflow Management Page › Action event Workflow History Version Configuration Page Path Jump Workflow Management Page
⚠️ [chromium] › plugins/@nocobase/plugin-workflow-action-trigger/src/client/__e2e__/configuration1.test.ts:24:7 › Configuration page to configure the Trigger node › Form Submit Button Binding Workflow Add Data Trigger
⚠️ [chromium] › plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts:13:5 › allows to configure interface
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › TableActionInitializers & GanttActionInitializers & MapActionInitializers should add bulk edit action › bulk edit in TableActionInitializers
⚠️ [chromium] › plugins/@nocobase/plugin-gantt/src/client/__e2e__/schemaInitailizer.test.ts:52:7 › configure fields › add association field should appends association

976 passed, 29 skipped
✔️✔️✔️

Full HTML report. Merge workflow run.

chareice pushed a commit that referenced this pull request Jun 4, 2024
…link action (#4506)

* feat: support link action

* feat(client): add new variable named 'URL search params'

* chore: add translation

* fix: avoid crashing

* chore: fix failed test

* feat: link action

* feat: link action

* fix: remove filter parameters with undefined values

* feat: link action

* feat: add support for default values in filter form fields

* refactor: code improve

* refactor: locale improve

* refactor: locale improve

* test: add e2e test

* refactor: locale improve

* refactor: locale improve

* fix: resolve operation issues with variables

* refactor: code improve

* chore: enable direct selection of variables as default value

* chore: use qs to parse query string

* fix: menu selectKeys (T-4373)

* refactor: use qs to stringify search params

* refactor: locale improve

* refactor: locale improve

* chore: fix failed tests

* fix: resolve issue where setting Data scope is not work

* chore: fix failed e2e tests

* chore: make e2e tests more stable

* chore: add translation

* chore: make e2e tests more stable

* fix: resolve the issue of error when saving data scope

* feat: trigger variable parsing after context change

* test: add unit tests

* test: add e2e test

* refactor: extract template

* chore: fix failed unit tests

* chore: fix failed e2e test

* fix(Link): hide linkage rules in top link (T-4410)

* fix(permission): remove URL search params variable from data scope

* chore: make more stable

* chore: make e2e test more stable

* fix(Link): reduce size for variable

* fix: clear previous context (T-4449)

* fix(calendar, map): resolve initial data scope setting error (T-4450)

* fix: correct concatenation of query string (T-4453)

---------

Co-authored-by: katherinehhh <katherine_15995@163.com>
Co-authored-by: jack zhang <1098626505@qq.com>
chareice added a commit that referenced this pull request Jun 5, 2024
* feat: chunk method in repository

* chore: xlsx export test

* chore: xlsx export

* chore: export action

* chore: export action

* chore: code

* feat: database interface manager

* feat: export with ui schema

* chore: console.log

* chore: export with china region field

* chore: export with attachments

* chore: export with multiple select

* chore: export with interface

* chore: export action

* fix: export with datetime file

* chore: limit export action running in same time

* chore: yarn.lock

* fix: render json value

* chore: chunk with limit

* feat: add EXPORT_LIMIT env config

* fix: typo

* fix: type

* chore: asyn mutex version

* chore: test

* chore: test

* fix: export null value

* chore: test

* chore: createdAt test

* fix: export with createdAt

* chore: import template

* chore: xlsx importer

* chore: import run

* chore: export with data source api

* chore: toValue api in interface

* fix: build

* chore: import with transaction

* fix: build database

* chore: many to one interface

* chore: code

* chore: import with associations

* chore: default toValue

* chore: import template with explain

* chore: import with explain template

* chore: reset id seq after import

* chore: download template action

* fix: database build

* fix: build

* fix: build

* fix: test

* chore: import with number field

* chore: import with boolean field

* chore: json interface

* chore: import action

* chore: typo

* chore: i18n

* chore: select interface

* chore: china region interface

* chore: datetiem field

* chore: cast to array

* fix: import tips

* chore: import await

* fix: test

* fix: test in mariadb

* chore: comments

* chore: comments

* fix: parse date with empty string

* fix: read import limit

* fix: type

* fix: test in mariadb

* chore: skip bigint test in sqlite

* chore: skip bigint test in sqlite

* chore: download tip i18n keys

* fix: download tips

* feat(client): add new variable named 'URL search params' and support link action (#4506)

* feat: support link action

* feat(client): add new variable named 'URL search params'

* chore: add translation

* fix: avoid crashing

* chore: fix failed test

* feat: link action

* feat: link action

* fix: remove filter parameters with undefined values

* feat: link action

* feat: add support for default values in filter form fields

* refactor: code improve

* refactor: locale improve

* refactor: locale improve

* test: add e2e test

* refactor: locale improve

* refactor: locale improve

* fix: resolve operation issues with variables

* refactor: code improve

* chore: enable direct selection of variables as default value

* chore: use qs to parse query string

* fix: menu selectKeys (T-4373)

* refactor: use qs to stringify search params

* refactor: locale improve

* refactor: locale improve

* chore: fix failed tests

* fix: resolve issue where setting Data scope is not work

* chore: fix failed e2e tests

* chore: make e2e tests more stable

* chore: add translation

* chore: make e2e tests more stable

* fix: resolve the issue of error when saving data scope

* feat: trigger variable parsing after context change

* test: add unit tests

* test: add e2e test

* refactor: extract template

* chore: fix failed unit tests

* chore: fix failed e2e test

* fix(Link): hide linkage rules in top link (T-4410)

* fix(permission): remove URL search params variable from data scope

* chore: make more stable

* chore: make e2e test more stable

* fix(Link): reduce size for variable

* fix: clear previous context (T-4449)

* fix(calendar, map): resolve initial data scope setting error (T-4450)

* fix: correct concatenation of query string (T-4453)

---------

Co-authored-by: katherinehhh <katherine_15995@163.com>
Co-authored-by: jack zhang <1098626505@qq.com>

* refactor(FormV2): add FormWithDataTemplates component (#4551)

* Revert "fix(client): fix data template style (#4536)"

This reverts commit db66090.

* refactor(FormV2): add FormWithDataTemplates component

* chore: fix failed e2e tests

* chore: make e2e test more stable

* chore: import warning i18n

* chore: import warning i18n

* fix: bug

* fix: export action loading

* fix: bug

* chore: map field interface

* fix: merge bug

---------

Co-authored-by: xilesun <2013xile@gmail.com>
Co-authored-by: Zeke Zhang <958414905@qq.com>
Co-authored-by: katherinehhh <katherine_15995@163.com>
Co-authored-by: jack zhang <1098626505@qq.com>
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.

None yet

3 participants