Skip to content

Conversation

@Josh-Walker-GM
Copy link
Contributor

Problem
Closes #6900

Solution
Restore the jsonDisplay function to the formatters template file.

Question
@Tobbe Did you mean to remove this function all together in #6221 and don't want it added back now?

Notes
I was initially confused why we could have imports of this non-existing function within passing test snapshots (see link below) until I realised the test doesn't care if the snapshot file is valid JS just that it character for character matches.
https://github.com/redwoodjs/redwood/blob/fd8229c550864f11c8140b8f8cb43f8d609ebd52/packages/cli/src/commands/generate/scaffold/__tests__/__snapshots__/scaffold.test.js.snap#L641

@jtoar jtoar added the release:fix This PR is a fix label Nov 16, 2022
@jtoar jtoar assigned jtoar and Tobbe and unassigned jtoar Nov 16, 2022
@Tobbe
Copy link
Contributor

Tobbe commented Nov 21, 2022

@Tobbe Did you mean to remove this function all together in #6221 and don't want it added back now?

No, not that I can remember. I guess I just missed it.

PR looks good, going to try it on a local project and then merge if everything checks out 🙂

@Tobbe Tobbe enabled auto-merge (squash) November 21, 2022 19:53
@Tobbe Tobbe merged commit 7e5d60a into redwoodjs:main Nov 21, 2022
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Nov 21, 2022
@redwoodjs-bot
Copy link

redwoodjs-bot bot commented Nov 21, 2022

🔔 @jtoar, @Tobbe—I couldn't cherry pick this one. If you want it in the next release, you'll have to cherry pick it manually.

@Josh-Walker-GM Josh-Walker-GM deleted the json-display branch November 21, 2022 23:12
jtoar pushed a commit that referenced this pull request Nov 23, 2022
…6902)

* Added jsonDisplay to formatters

* Update test snapshots

* Added jsonDisplay test to formatters.test.tsx.template

* Rebuilt test-project fixture

* Fix missing import in formatters test template

* Update test snapshot for jsonDisplay test

* update fixtures to include import fix

Co-authored-by: Tobbe Lundberg <[email protected]>
@jtoar jtoar modified the milestones: next-release, v3.5.0 Nov 23, 2022
jtoar pushed a commit that referenced this pull request Nov 23, 2022
…6902)

* Added jsonDisplay to formatters

* Update test snapshots

* Added jsonDisplay test to formatters.test.tsx.template

* Rebuilt test-project fixture

* Fix missing import in formatters test template

* Update test snapshot for jsonDisplay test

* update fixtures to include import fix

Co-authored-by: Tobbe Lundberg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix This PR is a fix

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug?]: missing export from formatters.tsx after scaffold generation with Json field

3 participants