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

Add color picker and choice of summary score style for wiggle track #1743

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

cmdcolin
Copy link
Collaborator

This adds a simple color picker for the wiggle track

This is almost going too far in a way, and I believe is starting to call into question the duplication of config items into state

I believe the user experience of having to clone a track and use our config editor is not ideal, and I think the track state and track menu helps, but it is causing duplication of code.

However, I also see that the continued use of track state as a way to open up a new opportunity: it offers a conceptually nice way to get config layers:I can simply say something like

// using concept from @teresam856 for top level config
getConf(getSession(self).WigglePluginSettings, 'someSetting')

Then I can get a "global setting" to apply to all my wiggle tracks a la config layers. This would be otherwise difficult to setup on every individual wiggle track

So there are tradeoffs here, but open to ideas.

Note that other track types like FeatureTrack could enjoy a color picker also

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Feb 25, 2021
@cmdcolin cmdcolin changed the base branch from master to display_cross_hatches February 25, 2021 08:22
@cmdcolin cmdcolin force-pushed the add_color_picker branch 2 times, most recently from c839338 to fe7941c Compare February 25, 2021 08:26
@cmdcolin cmdcolin marked this pull request as draft February 25, 2021 08:42
@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #1743 (0829b59) into master (a7a0a70) will decrease coverage by 0.06%.
The diff coverage is 10.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1743      +/-   ##
==========================================
- Coverage   58.73%   58.67%   -0.07%     
==========================================
  Files         455      456       +1     
  Lines       21049    21078      +29     
  Branches     4987     4990       +3     
==========================================
+ Hits        12364    12367       +3     
- Misses       8376     8402      +26     
  Partials      309      309              
Impacted Files Coverage Δ
.../LinearWiggleDisplay/components/SetColorDialog.tsx 6.25% <6.25%> (ø)
...ins/wiggle/src/LinearWiggleDisplay/models/model.ts 69.05% <15.38%> (-3.33%) ⬇️
packages/core/util/index.ts 82.10% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7a0a70...0829b59. Read the comment docs.

@cmdcolin cmdcolin force-pushed the add_color_picker branch 2 times, most recently from b75779d to 3b3847d Compare February 25, 2021 15:38
@cmdcolin cmdcolin added discuss in meeting enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Feb 26, 2021
@cmdcolin
Copy link
Collaborator Author

I tagged this discuss in meeting because of the duplication of config items in state. As noted above there are pros and cons. This was also brought up last week but the idea was that it seemed ok, but is there a point where it is too much

@rbuels
Copy link
Contributor

rbuels commented Feb 26, 2021

What if we had a chained config-reading thing that looked like:

readConfObjectChain([config1, config2, config3], 'slotName', [args])

would return the first non-default in the chain, or the default if none set
would enforce that each of them is the same config schema

@cmdcolin cmdcolin marked this pull request as ready for review February 26, 2021 21:16
@cmdcolin cmdcolin changed the base branch from display_cross_hatches to master February 26, 2021 21:18
@cmdcolin cmdcolin force-pushed the add_color_picker branch 2 times, most recently from 41a4604 to a1330a9 Compare February 27, 2021 02:03
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Mar 3, 2021

Regarding the above comment, we probably wouldn't want to "validate that they have the same config schema" (because the top le vel config would not have track name, track description, track id, etc.) but it could be an option. However this would likely be a future thing (that may break sessions if we change a lot of things) because most of the track menu item logic is manual and involves normal MST state instead of config objects. The above comment might apply to a more advanced future config layers idea

@cmdcolin cmdcolin changed the title Add color picker, choice of renderer type, and choice of summary score style for wiggle track Add color picker and choice of summary score style for wiggle track Mar 4, 2021
@rbuels rbuels merged commit 660b9bd into master Mar 4, 2021
@rbuels rbuels deleted the add_color_picker branch March 4, 2021 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants