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

🔨 remove availableEntities from SelectionArray #4591

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Feb 26, 2025

I tripped over the availableEntities of Grapher's selection in the last PR and wondered if it makes sense for the SelectionArray to manage both, the selected and the available entities.

I don't have a strong opinion but I am in slight favour of removing the available entities from the SelectionArray. I don't see a compelling reason for them to be part of the SelectionArray interface, and the fact that the available entities need to be kept up-to-date is a potential foot gun.

I also wonder if we could unify SelectionArray and FocusArray now that both essentially do the same thing (manage a selection).

Feel free to stop me – again, no strong opinion from my side.

Copy link
Member Author

sophiamersmann commented Feb 26, 2025

@owidbot
Copy link
Contributor

owidbot commented Feb 26, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-remove-available-entities

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-02-26 11:35:03 UTC
Execution time: 1.28 seconds

@sophiamersmann sophiamersmann force-pushed the grapher-exclude-entities branch from 403876a to 72228a4 Compare February 26, 2025 09:37
@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from 29068a0 to c105206 Compare February 26, 2025 09:38
@sophiamersmann sophiamersmann force-pushed the grapher-exclude-entities branch 2 times, most recently from 86cbd16 to bc428b6 Compare February 26, 2025 10:41
@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from c105206 to f7c60d4 Compare February 26, 2025 10:41
@sophiamersmann sophiamersmann force-pushed the grapher-exclude-entities branch from bc428b6 to 29ef92e Compare February 26, 2025 11:19
@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from f7c60d4 to aff2037 Compare February 26, 2025 11:19
@sophiamersmann sophiamersmann marked this pull request as ready for review February 26, 2025 11:38
@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from aff2037 to dfe1702 Compare February 26, 2025 11:42
@sophiamersmann sophiamersmann changed the base branch from grapher-exclude-entities to graphite-base/4591 February 26, 2025 13:49
@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from dfe1702 to 5b1b261 Compare February 26, 2025 13:50
@sophiamersmann sophiamersmann changed the base branch from graphite-base/4591 to master February 26, 2025 13:50
@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from 5b1b261 to ce90328 Compare February 26, 2025 13:50
Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

nice cleanup!

I tested this

  • on a standalone grapher page ✅
  • on a country page with the global entity selector ✅
  • on an explorer page ✅

@sophiamersmann sophiamersmann force-pushed the remove-available-entities branch from ce90328 to f15161a Compare February 28, 2025 09:44
@sophiamersmann sophiamersmann merged commit 8a97280 into master Feb 28, 2025
27 checks passed
@sophiamersmann sophiamersmann deleted the remove-available-entities branch February 28, 2025 11:57
Copy link

sentry-io bot commented Mar 3, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ RangeError: Out of memory FilterMask.apply(packages/@ourworldindata/core-... View Issue
  • ‼️ RangeError: Out of memory get AbstractCoreColumn.validRowIndices(packages... View Issue
  • ‼️ RangeError: Out of memory FilterMask.apply(packages/@ourworldindata/core-... View Issue
  • ‼️ RangeError: Out of memory get AbstractCoreColumn.validRowIndices(packages... View Issue
  • ‼️ Error: [mobx] Cycle detected in computation [email protected]: get availableEntities(){return this.tableForSelection.availableEntities} get Grapher.numSelectableEntityNames(packages/@... View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staging-viz Let SVG tester fail silently in CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants