Skip to content

null filter on the href channel #1699

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

Merged
merged 2 commits into from
Jun 22, 2023
Merged

null filter on the href channel #1699

merged 2 commits into from
Jun 22, 2023

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Jun 17, 2023

closes #1696

I wonder if we should not extend this to any channel that “enhances” the mark but is not a visual channel. That is, title and ariaLabel? (The “use case” of using them to filter marks out seems far-fetched.)

@Fil Fil added the question Further information is needed label Jun 17, 2023
@Fil Fil requested a review from mbostock June 17, 2023 12:50
Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

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

I looked at doing title before, and I wouldn’t change title’s filter; the olympians scatterplot with info tip is a nice example of where you do want to filter by the title channel.

I think we can always change the ariaLabel filter in the future if we can think of a use case. Let’s start here.

@Fil
Copy link
Contributor Author

Fil commented Jun 19, 2023

the olympians scatterplot with info tip is a nice example of where you do want to filter by the title channel.

The “filter iff the channel is not just an enhancement” rule covers this case. On the tip mark the title channel is necessary to display a (meaningful) tip.

@mbostock
Copy link
Member

On the tip mark the title channel is necessary to display a (meaningful) tip.

That would imply that the derived tip would filter more strictly than the original mark? Interesting. It might work.

@Fil
Copy link
Contributor Author

Fil commented Jun 19, 2023

it seems to work in #1704!

@mbostock mbostock enabled auto-merge (squash) June 22, 2023 16:42
…1704)

* the title channel is not filtering the mark, unless it's a tip mark

(any mark that depends on this channel must declare it)

* rename to sparse title

---------

Co-authored-by: Mike Bostock <[email protected]>
@mbostock mbostock merged commit 428bdbc into main Jun 22, 2023
@mbostock mbostock deleted the fil/filter-href branch June 22, 2023 17:03
Fil added a commit that referenced this pull request Aug 21, 2023
* null filter on the href channel

closes #1696

* the title channel is not filtering the mark, unless it's a tip mark (#1704)

* the title channel is not filtering the mark, unless it's a tip mark

(any mark that depends on this channel must declare it)

* rename to sparse title

---------

Co-authored-by: Mike Bostock <[email protected]>

---------

Co-authored-by: Mike Bostock <[email protected]>
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* null filter on the href channel

closes observablehq#1696

* the title channel is not filtering the mark, unless it's a tip mark (observablehq#1704)

* the title channel is not filtering the mark, unless it's a tip mark

(any mark that depends on this channel must declare it)

* rename to sparse title

---------

Co-authored-by: Mike Bostock <[email protected]>

---------

Co-authored-by: Mike Bostock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The href channel shouldn’t filter nullish values by default?
2 participants