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

Allow hiding subfeatures in the feature details panel #4091

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Conversation

cmdcolin
Copy link
Collaborator

from question asked here #4084

the current feature detail formatter was not able to handle this (can't set e.g. formatDetails->subfeatures to undefined because it is maintained in a separate __jbrowsefmt object that isnt iterated over)

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 27, 2023
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Nov 27, 2023
@cmdcolin
Copy link
Collaborator Author

another option I considered was detecting that subfeatures:undefined was set on the __jbrowsefmt object (by detecting 'subfeatures' in __jbrowsefmt && !__jbrowsefmt.subfeatures) but not sure that this is necessarily more clear

possible con to this approach: this hides all subfeatures, and not just those at a certain depth

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (05e1776) 63.24% compared to head (3ea0f52) 63.24%.

Files Patch % Lines
packages/core/BaseFeatureWidget/index.ts 60.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4091   +/-   ##
=======================================
  Coverage   63.24%   63.24%           
=======================================
  Files        1045     1045           
  Lines       30616    30618    +2     
  Branches     7314     7315    +1     
=======================================
+ Hits        19362    19365    +3     
  Misses      11084    11084           
+ Partials      170      169    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmdcolin
Copy link
Collaborator Author

removed the hideSubfeatures concept, instead changed to use

formatDetails:{
 maxDepth:0
}

this is more general in allowing different levels to be hidden

@cmdcolin cmdcolin merged commit d8cb2d3 into main Nov 29, 2023
11 checks passed
@cmdcolin cmdcolin deleted the hide_subfeatures branch November 29, 2023 17:32
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.

1 participant