forcedotcom / analyticsdx-vscode

Salesforce Analytics Extensions for Visual Studio Code
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

Field Grouping in layout.json #157

Closed xshenwork closed 1 year ago

xshenwork commented 1 year ago

What does this PR do?

Add field grouping (groupbox) layout.json editing and linting. Add tests for

Only available as pilot in Winter '24 release

What issues does this PR fix or reference?

@W-13868645@

aarondailsf2023 commented 1 year ago

Im no json schema expert (yet!) but I think the changes here look good

xshenwork commented 1 year ago

Looking good so far, nice job on the schema -- doing discriminated types like these are wonky in json schema. Some other things to look at, if you haven't already:

  • json schema valdiation tests (e.g. adding more good and bad values to the files in analyticsdx-template-lint/test/unit/schemas/layouts, updating invalidLayoutJsonTests.ts)
  • you can also add more valid json to the allRelpaths template under test-assets/sfdx-simple -- that's parsed and used by several other tests.
  • field completion tests for GroupBox items (layoutSchema.test.ts)
  • add to the json-schema defaultSnippets test in templateEditing/layout.test.ts for the ones in a groupbox items.
  • also update hover text on variable names, go to definition support for variable names, code completions for variable names, and quick fixes on bad variables names in the same file for groupbox items. If those break, look at the files under analyticsdx-vscod-templates/src/layout and update the json paths as needed.

Thanks a lot for the suggestions! I added everything except the tests for the last bullet/those tests are failing so i'm debugging if there's anything wrong with the json paths.