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: marker groups #5113

Merged
merged 4 commits into from
Apr 19, 2023
Merged

feat: marker groups #5113

merged 4 commits into from
Apr 19, 2023

Conversation

InspiredGuy
Copy link
Contributor

@InspiredGuy InspiredGuy commented Apr 4, 2023

Issue #, if available: #2720

Description of changes:

  • Adds MarkerGroup for adding multiple markers for an edit session. This could be useful for inline diagnostics or displaying occurrence.
  • Updates kitchen sink demo.
  • Updates TS definitions to reflect new additions.

How could it be used:

  • MarkerGroup is created by passing edit session object to it.
  • Single HoverTooltip instance could manage displaying multiple MarkerGroups. (see demo source)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ace.d.ts Outdated Show resolved Hide resolved
src/edit_session.js Outdated Show resolved Hide resolved
Base automatically changed from doc-tooltip to master April 14, 2023 09:52
@nightwing nightwing force-pushed the tooltip-marker branch 3 times, most recently from bec3380 to e2a8e4a Compare April 17, 2023 10:35
@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Patch coverage: 90.59% and project coverage change: +0.07 🎉

Comparison is base (23d4df6) 86.71% compared to head (6a9d56f) 86.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5113      +/-   ##
==========================================
+ Coverage   86.71%   86.79%   +0.07%     
==========================================
  Files         556      558       +2     
  Lines       43492    43604     +112     
  Branches     6762     6775      +13     
==========================================
+ Hits        37714    37846     +132     
+ Misses       5778     5758      -20     
Flag Coverage Δ
unittests 86.79% <90.59%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/search_highlight.js 96.96% <ø> (-0.09%) ⬇️
src/marker_group.js 81.81% <81.81%> (ø)
src/tooltip.js 87.14% <83.33%> (+0.50%) ⬆️
src/marker_group_test.js 98.03% <98.03%> (ø)
src/tooltip_test.js 99.06% <100.00%> (+0.09%) ⬆️

... and 4 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

ace.d.ts Show resolved Hide resolved

// this caps total amount of markers at 500 - should it maybe be done only for rendered markers?
// on top of it, do we need to cap the length of a rendered marker range to avoid performance issues?
MarkerGroup.prototype.MAX_MARKERS = 10000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the comments it says it's capped at max 500 markers but here it's set to 10k. Do we know what the performance impact is when rendering 10k markers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we do not render 10k markers, only markers on screen are rendered which should not cause performance issues,

@akoreman
Copy link
Contributor

The description of the API in the PR description doesn't match the current implementation as far as I can tell.

@InspiredGuy
Copy link
Contributor Author

The description of the API in the PR description doesn't match the current implementation as far as I can tell.

updated the description a bit

@akoreman
Copy link
Contributor

Before merging, can we change the PR title to something closer to what this PR does? If users see Markers with tooltips I fear they might get confused.

@InspiredGuy InspiredGuy changed the title feat: markers with tooltips feat: marker groups Apr 19, 2023
@InspiredGuy InspiredGuy merged commit 01d4605 into master Apr 19, 2023
@InspiredGuy InspiredGuy deleted the tooltip-marker branch April 19, 2023 08:39
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

4 participants