Skip to content

Tony/383_survey_results#101

Merged
gjwgit merged 1 commit into
devfrom
tony/383_survey_results
May 11, 2026
Merged

Tony/383_survey_results#101
gjwgit merged 1 commit into
devfrom
tony/383_survey_results

Conversation

@tonypioneer
Copy link
Copy Markdown
Collaborator

@tonypioneer tonypioneer commented May 6, 2026

Pull Request Details

Description

Rewrite collectData():

  • Read _hiddenContentMap and _hiddenContentVisibility from the state. For all hidden sections whose visibility is false, scan their content and use CommandPatterns to extract all widget names defined within them, then add those names to the excluded set. Recursively trace nested %%HiddenPlaceholder(id)%% blocks to properly handle nested hidden sections.
  • Skip any widgets contained in the excluded set when writing responses.
  • Do not write null values for radio, dropdown, or date fields into the response anymore (to avoid downstream consumers expecting a String but receiving null).

Related Issues

anusii/riopod#383

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How To Test?

Run the example app of Markdown Widget Builder and export json file to local disk.

Checklist

  • Screenshots included in linked issue #
  • Changes adhere to the style and coding guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • The update contains no confidential information
  • The update has no duplicated content
  • No lint check errors are related to these changes (make prep or flutter analyze lib)
  • Integration test dart test output or screenshot included in issue #
  • I tested the PR on these devices:
    • Android
    • iOS
    • Linux
    • MacOS
    • Windows
    • Web
  • I have identified reviewers
  • The PR has been approved by reviewers

Finalising

  • Merge dev into the this branch
  • Resolve any conflicts
  • Add a one line summary into the CHANGELOG.md
  • Push to the git repository and review
  • Merge the PR into dev

@srodriguez142857
Copy link
Copy Markdown
Collaborator

All went smoothly in my tests. Thanks, Tony.

Copy link
Copy Markdown
Collaborator

@srodriguez142857 srodriguez142857 left a comment

Choose a reason for hiding this comment

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

The app is working as expected

@srodriguez142857
Copy link
Copy Markdown
Collaborator

srodriguez142857 commented May 8, 2026

Do not write null values for radio, dropdown, or date fields into the response anymore (to avoid downstream consumers expecting a String but receiving null).

I have the following comment regarding the above decision: we should allow developers to decide whether to write null values or exclude those fields in the JSON structure. This decision should be made by the app developers, who know the best way to generate the JSON structure based on the app's business logic. The decision of:

  • Skipping fields and not generating them, or
  • Generating them with null values, or
  • Generating them with empty strings or any other default value (0 for integers or 1970-01-01 for dates),

should be made by the developer.

If all agree, this could be an enhancement for the widget: a new non-critical issue/ticket.

@gjwgit gjwgit merged commit 2ad8af4 into dev May 11, 2026
20 checks passed
@gjwgit gjwgit deleted the tony/383_survey_results branch May 11, 2026 02:34
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