-
Notifications
You must be signed in to change notification settings - Fork 32
Refinements in Summary2, adding component-level overrides #3344
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
Conversation
This file contains hidden or 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
…stand there), and trying to grok the code here.
…des for isCompact, as well as possibly being related to the root cause behind issues like #3234
… level. I want to structure this better, and verify that summarizable components all have the summarizable capability set up (indicating that they have summary-related props as well)
…erSummary and renderSummary2
…em from the context directly to make it more clear where they are actually used.
…to common components (which now require these props)
…ng the 'forceShow' common prop that was never read.
…summary overrides. This isn't quite working yet because something is ruining the entire jsonschema. Committing now before merging from main and continuing debugging.
…of every common object, ruining the additionalProperties check so that it returned false in some cases.
|
adamhaeger
reviewed
May 9, 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.
Some good changes, but not sure about added features.
adamhaeger
approved these changes
May 14, 2025
19 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-ignore
This PR is a new feature and should not be cherry-picked onto release branches
kind/product-feature
Pull requests containing new features
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.
Description
When looking more closely at Summary2 I found some minor things I wanted to clean up, and I ended up adding a feature I think app developers will appreaciate.
List of changes here (trying to follow the order in the diff on github):
tsx
to run code generation makes it slightly fasterforceShow
override option, as it was never read/used, so it had no effect.config.ts
file exporting their summary overrides, I baked this into the code generator so that you can use the newaddSummaryOverrides()
function instead. TheSummary2
config itself will automatically get all the different override variants that are possible.summaryTitle
are added. That binding doesn't work yet for Summary2, but there's a separate issue for that - Summary2 component does not support summaryTitle property #2872component-verification.test.ts
. This tests that all summarizable components actually implementrenderSummary2()
....which they don't, so this test has to be skipped for now. 😢isCompact
andoverride
as props, and created hooks for getting those properties from the context instead. Now everyrenderSummary2()
getsSummary2Props
that just contains the target node.Group
component override forisCompact
was passed around, and in the end passed over toComponentSummary
, which never read it. Since it had no effect, I removed that override property forGroup
components. Now theisCompact
property can only be set on theSummary2
component and is not an override.isCompact
andemptyFieldText
, and it was hard to notice because the properties were optional. I made them required, and implemented them in the components that were not passing these on to the underlying dumb components.type: layoutSet
it should not be valid to specify anid
property. When that was possible it looked like you could specify which layout set you wanted to render a summary for (such as a sub form), but the actual layout-set we render a summary for is derived fromtaskId
andid
is ignored.The feature part of this lets you set overrides for all components of a given type in Summary2:
Related Issue(s)
Verification/QA
kind/*
andbackport*
label to this PR for proper release notes grouping