-
Notifications
You must be signed in to change notification settings - Fork 8
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
Query by Sets #480
Open
JakeWags
wants to merge
21
commits into
main
Choose a base branch
from
375-query-by-set
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Query by Sets #480
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…move query functionality
✅ Deploy Preview for upset2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
NateLanza
requested changes
Feb 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes needed; see comments. I think you might want to check that eslint is working for you as some of these should have been caught by your linter/typechecker.
packages/upset/src/components/custom/QueryBySet/SetQueryRow.tsx
Outdated
Show resolved
Hide resolved
… names and improve documentation for better understanding.
…dering components
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does this PR close any open issues?
Closes #375
Give a longer description of what this PR addresses and why it's needed
This pull request introduces several updates to the
UpsetConfig
and related components, primarily focusing on adding support for set queries and updating configuration versions. The key changes include the addition of new types, conversion functions, and utility methods to handle set queries, as well as updates to existing functions to accommodate these changes.For query by sets, one of the differences between the "old" upset behavior and this is that the query now removes all elements OTHER than those that are included in the query. This will override any aggregation, but keep any sorting and filtering within the query.
Note: I personally am not a fan of the alert for setting the name, this is just a simple solution. A textbook may be difficult to implement within the SVG, but I haven't tried.
Configuration and Type Updates:
SetQuery
,SetQueryMembership
, andVersion0_1_2
to support set queries and updated configurations. (packages/core/src/types.ts
) [1] [2] [3] [4]UpsetConfig
version to0.1.2
and included thesetQuery
field. (packages/core/src/types.ts
,packages/core/src/defaultConfig.ts
) [1] [2]Conversion Functions:
0.1.0
to0.1.1
and from0.1.1
to0.1.2
. (packages/core/src/convertConfig.ts
) [1] [2]Rendering and Query Handling:
flattenRows
andgetQueryResult
to handle set queries and flatten hierarchical row structures. (packages/core/src/render.ts
) [1] [2]sortByRR
,filterRR
, andgetRows
to incorporate set query handling. (packages/core/src/render.ts
) [1] [2]Type Checking:
SetQuery
,SetQueryMembership
, andSetMembershipStatus
. (packages/core/src/typecheck.ts
)isUpsetConfig
to validate the newsetQuery
field and version0.1.2
. (packages/core/src/typecheck.ts
) [1] [2] [3] [4]Utility Methods:
isPopulatedSetQuery
to check if aSetQuery
is populated. (packages/core/src/typeutils.ts
)These changes enhance the flexibility and functionality of the
UpsetConfig
by allowing more complex queries and ensuring compatibility with future versions.Provide pictures/videos of the behavior before and after these changes (optional)
Have you added or updated relevant tests?
Have you added or updated relevant documentation?
Are there any additional TODOs before this PR is ready to go?
TODOs: