What has been done to verify that this works as intended?
Manually verified it. Will add component tests soon.
I have also verified that initial bundle size doesn't increase with this PR, new assets are only loaded when new Web Form preview page is opened.
Why is this the best possible solution? Were any other approaches considered?
We discussed other options like printing URL of the new Web Forms preview in the console, but that would pollute the console log. Current approach just prints the instruction once at the start of the application about how to access new Web Forms preview.
I have added a new standalone meta property to the routes, by default its value is false for all the routes and true for FormPreview. When this property is true, I don't render navigation bar and application's wrapper. Other option was to add new Odk-Web-Forms component in a separate Vue instance, which would be devoid of all the functionality that we already have like auth, request, store, etc. and probably separate build configurations.
I have create FeatureFlags composable that can be extended to include more alpha/beta features in the future. I am open to not go that route and rename this composable to just reflect new Web Forms feature.
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?
Does this change require updates to user documentation? If so, please file an issue here and include the link below.
Maybe not. We will probably announce this in our Insiders call
Before submitting this PR, please make sure you have:
[x] run npm run test and npm run lint and confirmed all checks still pass OR confirm CircleCI build passes
[x] verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced
@matthew-white thanks for reviewing this, can please double check my last commit. It fixes a subtle bug where "New Preview" button is not clickable when focus is on any element on the page. Steps to reproduce:
Press tab until your focus is on any button or link on the page such as "User" in the top navbar
https://github.com/getodk/central-frontend/assets/447837/0114b2ba-6451-44b7-bc5c-2b0e45a773cf
What has been done to verify that this works as intended?
Manually verified it. Will add component tests soon.
I have also verified that initial bundle size doesn't increase with this PR, new assets are only loaded when new Web Form preview page is opened.
Why is this the best possible solution? Were any other approaches considered?
We discussed other options like printing URL of the new Web Forms preview in the console, but that would pollute the console log. Current approach just prints the instruction once at the start of the application about how to access new Web Forms preview.
I have added a new
standalone
meta property to the routes, by default its value is false for all the routes and true for FormPreview. When this property is true, I don't render navigation bar and application's wrapper. Other option was to add new Odk-Web-Forms component in a separate Vue instance, which would be devoid of all the functionality that we already have like auth, request, store, etc. and probably separate build configurations.I have create FeatureFlags composable that can be extended to include more alpha/beta features in the future. I am open to not go that route and rename this composable to just reflect new Web Forms feature.
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?
Does this change require updates to user documentation? If so, please file an issue here and include the link below.
Maybe not. We will probably announce this in our Insiders call
Before submitting this PR, please make sure you have:
npm run test
andnpm run lint
and confirmed all checks still pass OR confirm CircleCI build passes