Closed
Conversation
Member
|
@ktuite, who do you think should review this PR? I have context on the existing update modal, and I'd be happy to review. But I'm also happy for Sadiq to review if you two have already chatted about it. |
| { | ||
| "en": { | ||
| "upload": "Upload Entities", | ||
| "new": "New", |
Member
There was a problem hiding this comment.
How about adding a comment for translators? They may need to know the noun that "New" applies to in order to inflect "New".
Comment on lines
+1
to
+11
| <!-- | ||
| Copyright 2026 ODK Central Developers | ||
| See the NOTICE file at the top-level directory of this distribution and at | ||
| https://github.com/getodk/central-frontend/blob/master/NOTICE. | ||
|
|
||
| This file is part of ODK Central. It is subject to the license terms in | ||
| the LICENSE file found in the top-level directory of this distribution and at | ||
| https://www.apache.org/licenses/LICENSE-2.0. No part of ODK Central, | ||
| including this file, may be copied, modified, propagated, or distributed | ||
| except according to the terms contained in the LICENSE file. | ||
| --> |
Member
There was a problem hiding this comment.
We don't need file headers anymore. 🎉 getodk/governance#2 (comment) So I think this can be removed.
Member
|
I think we discussed on Thursday that @ktuite is still working on this issue. So I think we can go ahead and mark this PR as draft. |
2 tasks
Member
Author
|
On my way to #1480 I had this as an intermediary. |
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
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.


Was related to getodk/central#1638
Sadiq, Nicole, and I talked about reusing the update entity modal. When I looked into it, there were enough differences (different API route, conditional things about showing/not showing the middle column, conditional things about comparing new data with old data or not) that it seemed simpler to make a new component. It's inspired by the update component, though, and it uses the same EntityUpdateRow component, which has been changed to optionally not show the "old value" middle column.
New create modal:

Create modal with values filled in:

Update modal for reference:

What has been done to verify that this works as intended?
Trying it, new tests.
Why is this the best possible solution? Were any other approaches considered?
Maybe refactoring the update modal to work for create would actually be fine.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Lets users create entities in frontend!
Does this change require updates to user documentation? If so, please file an issue here and include the link below.
Before submitting this PR, please make sure you have:
npm run testandnpm run lintand confirmed all checks still pass OR confirm CircleCI build passes