-
Notifications
You must be signed in to change notification settings - Fork 41
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
188363563 Formula Editor API Requests #1560
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1560 +/- ##
==========================================
+ Coverage 84.33% 84.34% +0.01%
==========================================
Files 587 587
Lines 29606 29609 +3
Branches 8124 8125 +1
==========================================
+ Hits 24967 24973 +6
- Misses 4305 4481 +176
+ Partials 334 155 -179
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
codap-v3 Run #4755
Run Properties:
|
Project |
codap-v3
|
Branch Review |
main
|
Run status |
Passed #4755
|
Run duration | 08m 44s |
Commit |
a63aeb2510: 188363563 Formula Editor API Requests (#1560)
|
Committer | Teale Fristoe |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
45
|
Skipped |
0
|
Passing |
218
|
View all changes introduced in this branch ↗︎ |
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.
👍 Looks good -- nice refactor!
PT Story: https://www.pivotaltracker.com/story/show/188363563
This PR adds support for the
notify attribute
withrequest: formulaEditor
API request, which displays the formula editor from a plugin.This required more work than expected. The main problem is that, previously, each table and case card had a separate
EditFormulaModal
for each attribute. This was awkward for a couple of reasons: the API handler had to use another tile's modal, and if there was no table or case card associated with the given attribute, there was no modal to show at all. To fix this issue, a single modal was added to theContainer
, which any tile can use for any attribute viauiState.editFormulaAttributeId
.EditFormulaModal
is no longer wrapped in aDataSetContext
, so it needs to find the dataset that contains the specified attribute, and then provides its ownDataSetContext
to its children.EditFormulaModal
has been moved fromcase-tile-common
tocommon
, since it is no longer tied to tables and case cards.EditFormulaModal
is that theuseEffect
that refreshes the display formula now triggers when theattribute
changes.This work can be tested with this Codap link: https://codap3.concord.org/branch/v3-di-formula-editor-request/#file=examples:Mammals
And this Multidata link: https://models-resources.concord.org/multidata-plugin/branch/display-formula-editor/index.html