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: Data value search #3646

Merged
merged 8 commits into from
Sep 11, 2024
Merged

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Sep 10, 2024

What does this PR do?

  • Ensures that searching via the "data" facet works for all component types
  • For each component which has a unique way of handling data variables, we need to ensure we can still access display details for these components. These components and their associated exceptions are encoded in the DataDisplayMap data structure
  • Removes temporary guard / filter on search result cards which previously hid these exceptional components
Screen.Recording.2024-09-10.at.11.01.26.mov

Next up...

@DafyddLlyr DafyddLlyr force-pushed the dp/search-all-component-data-fields branch 2 times, most recently from 2b95284 to e6a67a9 Compare September 10, 2024 06:33
Copy link

github-actions bot commented Sep 10, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr force-pushed the dp/search-all-component-data-fields branch 2 times, most recently from 605c1d4 to 5575c3c Compare September 10, 2024 10:40
Comment on lines +50 to +52
(item["data"] as unknown as FileUploadAndLabel)["fileTypes"][refIndex][
"fn"
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a fair amount of type casting in this data structure as IndexedNode (and our flow as a whole) are not strongly typed.

We can't use a type guard as the types of IndexedNode["data"] and various components have no overlap - we hit the "A type predicate's type must be assignable to its parameter's type" error.

This means that casting is unfortunately necessary, but it's better than using any or just optional chaining the whole way down.


const handleClick = () => {
console.log("todo!");
console.log({ nodeId: result.item.id });
console.log({ result });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The next PR should be handling this!

@DafyddLlyr DafyddLlyr requested a review from a team September 10, 2024 10:59
@DafyddLlyr DafyddLlyr changed the title feat(wip): Data value search feat: Data value search Sep 10, 2024
@DafyddLlyr DafyddLlyr marked this pull request as ready for review September 10, 2024 10:59
@DafyddLlyr DafyddLlyr removed the request for review from a team September 10, 2024 11:00
@DafyddLlyr DafyddLlyr marked this pull request as draft September 10, 2024 11:00
@DafyddLlyr DafyddLlyr marked this pull request as ready for review September 10, 2024 12:40
@DafyddLlyr DafyddLlyr requested a review from a team September 10, 2024 12:40
@DafyddLlyr
Copy link
Contributor Author

Ready for review, just getting some Vultr issues. Will destroy / recreate if latest re-run fails.

@jessicamcinchak
Copy link
Member

@DafyddLlyr FYI data sync failed here & can't log into pizza! https://hasura.3646.planx.pizza/console/data/default/schema/public/tables/users/browse

@DafyddLlyr
Copy link
Contributor Author

Thanks for flagging @jessicamcinchak - taking a look!

@DafyddLlyr DafyddLlyr force-pushed the dp/search-all-component-data-fields branch from c978bb3 to 78be419 Compare September 10, 2024 15:56
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

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

Working as expected on pizza & tests are clear here ! Displays values feel very clear 🙌

@DafyddLlyr DafyddLlyr merged commit 80b88d3 into main Sep 11, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/search-all-component-data-fields branch September 11, 2024 09:45
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.

2 participants