-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Gantt - Add target in links #4695
base: develop
Are you sure you want to change the base?
Conversation
… tsx instead of ts-node-esm
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4695 +/- ##
===========================================
- Coverage 45.32% 45.30% -0.03%
===========================================
Files 52 52
Lines 6645 6651 +6
Branches 18 18
===========================================
+ Hits 3012 3013 +1
- Misses 3633 3638 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
"docs:release-version": "ts-node-esm scripts/update-release-version.mts", | ||
"docs:verify-version": "ts-node-esm scripts/update-release-version.mts --verify", | ||
"types:build-config": "ts-node-esm --transpileOnly scripts/create-types-from-json-schema.mts", | ||
"types:verify-config": "ts-node-esm scripts/create-types-from-json-schema.mts --verify", | ||
"docs:release-version": "tsx scripts/update-release-version.mts", | ||
"docs:verify-version": "tsx scripts/update-release-version.mts --verify", | ||
"types:build-config": "tsx --transpileOnly scripts/create-types-from-json-schema.mts", | ||
"types:verify-config": "tsx scripts/create-types-from-json-schema.mts --verify", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please move the changes related to npx and tsx to another PR?
We've had issues when using tsx in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
I think we can keep the syntax simpler by sticking to how other diagrams support targets. There's no need to support with and without quotes.
links[id] = linkStr; | ||
links[id] = [linkStr, target]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use arrays, use objects, so it's clear when using the values.
links[id] = {link: linkStr, target};
"_self" return 'hreftarget'; | ||
\"_self\" return 'hreftarget'; | ||
"_blank" return 'hreftarget'; | ||
\"_blank\" return 'hreftarget'; | ||
"_parent" return 'hreftarget'; | ||
\"_parent\" return 'hreftarget'; | ||
"_top" return 'hreftarget'; | ||
\"_top\" return 'hreftarget'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"_self" return 'LINK_TARGET';
"_blank" return 'LINK_TARGET';
"_parent" return 'LINK_TARGET';
"_top" return 'LINK_TARGET';
This is from flow.jison.
Why do we need the duplicates with escaped quotes?
@ykatchou waiting for your updates |
📑 Summary
In order to all links within gantt chart to open in a new tab (or allow a new target) i did add the target options to links.
Resolves #3326
📏 Design Decisions
As discussed in the issue #3326 , i did base my change on the changes done on flowchart in #1585.
I did limit the usage of target to the main case of a simple url.
As I’m not a js dev, i did start from a "clean" env.
To make the dev env works, I did need to do some slight changes.
Those changes were done in a dedicated commit (the first one) :
Those changes were done in a dedicated commit (the first one), feel free to revert those.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch