Skip to content

Component to create entity in the UI#1477

Closed
ktuite wants to merge 2 commits intomasterfrom
ktuite/create_entity
Closed

Component to create entity in the UI#1477
ktuite wants to merge 2 commits intomasterfrom
ktuite/create_entity

Conversation

@ktuite
Copy link
Member

@ktuite ktuite commented Feb 17, 2026

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:
Screenshot 2026-02-25 at 5 17 10 PM

Create modal with values filled in:
Screenshot 2026-02-25 at 5 17 06 PM

Update modal for reference:
Screenshot 2026-02-25 at 5 17 23 PM

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:

  • run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

@matthew-white
Copy link
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.

@ktuite ktuite requested a review from matthew-white February 18, 2026 21:31
{
"en": {
"upload": "Upload Entities",
"new": "New",
Copy link
Member

Choose a reason for hiding this comment

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

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.
-->
Copy link
Member

Choose a reason for hiding this comment

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

We don't need file headers anymore. 🎉 getodk/governance#2 (comment) So I think this can be removed.

@matthew-white
Copy link
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.

@ktuite
Copy link
Member Author

ktuite commented Feb 26, 2026

On my way to #1480 I had this as an intermediary.

Mix of old form-group input field with unstyled textareas
Screenshot 2026-02-25 at 5 19 31 PM

form-group input field that shows label below input
Screenshot 2026-02-25 at 5 20 00 PM

@ktuite ktuite closed this Mar 3, 2026
@ktuite ktuite deleted the ktuite/create_entity branch March 3, 2026 01:43
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