Skip to content

Conversation

@pregnantboy
Copy link
Contributor

@pregnantboy pregnantboy commented Jun 11, 2025

Improve FormSG Variable Display and Labeling

Problem

Users are selecting Question variables by mistake.

Solution

  • Collapses questions variables by default with a "Show more" button. We still expose them in case they are being used.
  • Labels for response variables now show the question text instead (e.g., "1. What is your name?" instead of "Response 1")
  • Remove answer variables for headers (paragraphs are already removed by FormSG)
  • Enhances table field display to show column names when not ambiguous

    i.e. 11. Row 1 Name - Table question

  • Improves address field labels
  • Fix question number to match the order shown in the form (e.g. exclude headers and paragraphs)

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@datadog-opengovsg
Copy link

Datadog Report

Branch report: chore/hide-formsg-questions
Commit report: e7e6c5c
Test service: plumber

✅ 0 Failed, 829 Passed, 0 Skipped, 2m 31.63s Total Time
⬆️ Test Sessions change in coverage: 1 increased (+0.07%)

@pregnantboy pregnantboy marked this pull request as ready for review June 11, 2025 09:18
@pregnantboy pregnantboy requested a review from a team as a code owner June 11, 2025 09:18
@pregnantboy pregnantboy changed the title chore: hide formsg questions and re-label some fields PLU-363: hide formsg questions and re-label some fields Jun 11, 2025
@linear
Copy link

linear bot commented Jun 11, 2025

PLU-363 FormSG variables

})

it('sets label and order to null if question number is undefined', async () => {
it('should computes order for questions and answers even if order is not provided', async () => {
Copy link

Choose a reason for hiding this comment

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

The test description has a grammatical error. It should be either "should compute order" or "computes order" rather than "should computes order".

Suggested change
it('should computes order for questions and answers even if order is not provided', async () => {
it('should compute order for questions and answers even if order is not provided', async () => {

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

@kevinkim-ogp
Copy link
Contributor

bugbot run

Copy link
Contributor

@kevinkim-ogp kevinkim-ogp left a comment

Choose a reason for hiding this comment

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

lgtm, tested and confirmed that it works 👍

@pregnantboy pregnantboy merged commit 4c2c51a into develop-v2 Jun 19, 2025
6 checks passed
@pregnantboy pregnantboy deleted the chore/hide-formsg-questions branch June 19, 2025 06:41
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.

3 participants