-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add ability to customize About dialog with callbacks and optionally hide links to data #3230
Conversation
060c5ec
to
fb5188d
Compare
Is there an extension point that plugins can use to modify the about dialog
as well? If not, could add one in this
…On Thu, Sep 29, 2022 at 9:01 AM Colin Diesh ***@***.***> wrote:
Adds a formatAbout config subschema similar to formatDetails
formatAbout can be applied per track or at the entire jbrowse config
level (so you can add hideUris to the entire jbrowse config)
-
The formatAbout subschema has a hideUris slot to hide the rendering of
"UriLocation" objects in the about dialog. Note that the hideUris
results in the "Copy config" button getting hidden too, since copying to
text would reveal this type of hidden info...
-
The formatAbout subschema also has a conf slot to add arbitrary jexl
callbacks to the display of the conf object in the about dialog
Possible fix for #3213
<#3213>
Rider change: makes a getTrackName utility function that computes the
track name (the logic for making the "reference sequence track name" was
duplicated in several places)
------------------------------
You can view, comment on, or merge this pull request online at:
#3230
Commit Summary
- e480bfb
<e480bfb>
Consolidate getTrackName into a single util function
- 8f2d63d
<8f2d63d>
Test out hideUris
- fc0119d
<fc0119d>
Session wide about detail formatter
- 060c5ec
<060c5ec>
Session wide feature detail formatters
File Changes
(16 files <https://github.com/GMOD/jbrowse-components/pull/3230/files>)
- *M* packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-21b09c647dc31d38e34ebaf534224fbfbf2ac802a06f8383b26e19bce59175b8>
(17)
- *M* packages/core/BaseFeatureWidget/index.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-f9c7d7ab80762cdd10c26c44ba492ff0160ab85067ed3f25c66545119b5e4b6b>
(39)
- *M* packages/core/pluggableElementTypes/models/baseTrackConfig.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-8e728ba842d4db42eaaa38288424736b839611cf13788776283fc67bb6a2b8e5>
(20)
- *M* packages/core/ui/AboutDialog.tsx
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-724a9be883a75978e181efa245d792c58785995471d1dd6c3080a5669ea8b526>
(58)
- *M* packages/core/util/tracks.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-2887cdb5bd75d3ee14567ffc2c20fedb974dad8c9a772952756e7fa59f09b402>
(25)
- *M*
plugins/data-management/src/HierarchicalTrackSelectorWidget/model.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-57f9ccf43c6a6dfb5af36c32f44b8bba8c6339a9e1a76409b44c26f2fefe5ceb>
(37)
- *M*
plugins/linear-genome-view/src/LinearGenomeView/components/SearchResultsDialog.tsx
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-37732fa6819446136f83f4a6c3f86031d25ed16d429c8da9ccff44171570c569>
(12)
- *M*
plugins/linear-genome-view/src/LinearGenomeView/components/TrackLabel.tsx
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-8e4816f5ac3cca186371638051f264da704f2f2196be7499df38cf3a0a0d50ae>
(53)
- *M* plugins/sequence/src/ReferenceSequenceTrack/configSchema.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-554f3bba23bb18327aaa32a63dfa87cd8c613c7e2d9f07b64b0aadcd46477e22>
(13)
- *M* plugins/variants/src/LinearVariantDisplay/model.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-e4cb4e998425a19b8cf90774ae3382b413d789293d4807596cb77da6920c0cef>
(23)
- *M*
products/jbrowse-react-circular-genome-view/src/createModel/createConfigModel.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-378270c65cc027c87c2ddb7dd91359c294e84a7570fdd38cabcf4b7399c9c289>
(31)
- *M*
products/jbrowse-react-linear-genome-view/src/createModel/createConfigModel.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-5f79d30ba2d8bd9bf5d6343b8c0407ebdd6556df3903ba0e09135292f8ecefeb>
(37)
- *M* products/jbrowse-web/src/jbrowseModel.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-edd77609d1a93193117475df3a391d96c5f4fdb64bd56676f59e7665f40ae638>
(31)
- *M* products/jbrowse-web/src/sessionModelFactory.ts
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-ec8c915b996105b51d462d334aa397581f072bd708a267d33e462768117d1da7>
(40)
- *M* test_data/volvox/config.json
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-a4dba377ea7fb4f912686925805dff1b59091a4227134814962360555dfd1734>
(4)
- *M* test_data/volvox/config_main_thread.json
<https://github.com/GMOD/jbrowse-components/pull/3230/files#diff-10379aab6c1438369aa9dcbe765071a1182a3febc444288f20b9f7abe2a9a533>
(7)
Patch Links:
- https://github.com/GMOD/jbrowse-components/pull/3230.patch
- https://github.com/GMOD/jbrowse-components/pull/3230.diff
—
Reply to this email directly, view it on GitHub
<#3230>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAASAFO4T7QVKBTWDMIUIE3WAW4PBANCNFSM6AAAAAAQY5QSGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
24ddad7
to
0c4c87d
Compare
Added "Core-customizeAbout" extension point that receives a conf object to customize the contents |
could be interesting to allow track types or plugins to customize the entirety of the about component, similar to how widgets can be swapped out perhaps |
Codecov Report
@@ Coverage Diff @@
## main #3230 +/- ##
==========================================
+ Coverage 59.52% 59.58% +0.05%
==========================================
Files 676 676
Lines 28807 28817 +10
Branches 7041 7047 +6
==========================================
+ Hits 17148 17170 +22
+ Misses 11385 11370 -15
- Partials 274 277 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
0c4c87d
to
945ab9e
Compare
Just curious -- what does the change to getEnv do for us? |
that was indeed a rider change added to this, but it gives us better typescript (getEnv is returning an |
17b933e
to
ada36fd
Compare
putting this in draft till some things like #3262 can be resolved. |
30e6174
to
67ad97d
Compare
this is now enhanced with a couple more extension points that let you do some relatively crazy things including a) completely replacing the contents of any widget by responding to Core-replaceWidget in addition, there are the about panel config options for
this PR is rebased off of #3266 and has examples of doing these things in our volvox config |
0014879
to
d396cf6
Compare
f42e908
to
7af4235
Compare
7af4235
to
c0d6609
Compare
this pr should be ready Note that this PR now adds a number of new extension points including the ability to add custom react components to the feature details widget and "about track" dialog, or completely replace them with a custom component (the ability to replace the widget can replace ANY widget) new extension point names Core-extraFeaturePanel they are documented in the api_guide |
tentatively fixes #2034 |
maybe go ahead with a merge, examples of these extension points are in various volvox tracks |
Adds a
formatAbout
config subschema similar toformatDetails
formatAbout
can be applied per track or at the entire jbrowse config level (so you can add hideUris to the entire jbrowse config)The
formatAbout
subschema has ahideUris
slot to hide the rendering of "UriLocation" objects in the about dialog. Note that thehideUris
results in the "Copy config" button getting hidden too, since copying to text would reveal this type of hidden info...The
formatAbout
subschema also has aconfig
slot to add arbitrary jexl callbacks to the display of the config snapshot in the about dialogPossible fix for #3213
Rider change: makes a getTrackName utility function that computes the track name (the logic for making the "reference sequence track name" was duplicated in several places)