Skip to content

chore(web-forms#820): clean up common package#1673

Draft
garethbowen wants to merge 19 commits into
getodk:masterfrom
garethbowen:rename-reamde
Draft

chore(web-forms#820): clean up common package#1673
garethbowen wants to merge 19 commits into
getodk:masterfrom
garethbowen:rename-reamde

Conversation

@garethbowen

@garethbowen garethbowen commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Closes getodk/web-forms#820

What has been done to verify that this works as intended?

CI
Local dev

Why is this the best possible solution? Were any other approaches considered?

The demo app has been moved to a new repo: https://github.com/getodk/web-forms-demo
These files are being moved into a different repo in this PR: getodk/sample-forms#7
This means these files are no longer needed here except for where they are used in tests. Where they were used by xforms-engine integration tests I have moved them into the xforms-engine package. Where they were used by e2e tests I've moved them into the web-forms package.
I have created the bare minimum app for testing purposes, and removed utility files that were doing things like scanning for forms.
This is much simpler and easier to maintain and therefore more appropriate for the now much smaller number of files being managed.

How does this change impact users? Describe intentional behavior changes from code updates. What are the regression risks?

It shouldn't.

Does this change require updates to user documentation? If so, please file an issue here and include the link below.

No.

@garethbowen garethbowen requested a review from latin-panda June 29, 2026 01:41
@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 060bab7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@garethbowen garethbowen marked this pull request as draft June 29, 2026 02:30
@garethbowen

Copy link
Copy Markdown
Contributor Author

Converted to draft because this should not be merged until after the 2026.2 release.

@latin-panda latin-panda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wow, so many files were deleted! Just a couple of suggestions below.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I haven't checked the other forms, but this one has additional attachments we'll likely need for testing.

Can you please add them to the /attachments folder? They use different file extensions intentionally.

Image Image Image Image Image Image Image Image Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

While the form does reference these files there is no visual or functional test that checks that they load so I left them out intentionally. I'd rather not add files which aren't used or useful.

... we'll likely need for testing.

Do you mean they'll be needed in the future? Are you thinking manual or automatic testing?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I mean automated tests. The display of all select appearances is quite complex and took a lot of effort to get right, and we should have e2e tests; we just haven't added them yet. 😣

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This would be a screenshot/visual e2e test I assume? I don't know how you would test this functionally...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok.. I've added screenshot tests for 4 of the image select types and added them back as attachments. I extracted the screenshot code from the maps control so it can be reused, so it's worth reviewing.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this only used for e2e tests? Maybe it's better to move it inside /e2e for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@garethbowen garethbowen requested a review from latin-panda June 30, 2026 02:41

@latin-panda latin-panda left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for adding the new test coverage for select labels! ✨

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.

Clean up the "common" package

2 participants