Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding optional field for FieldColumns #124

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

oklex
Copy link
Contributor

@oklex oklex commented Nov 12, 2024

Description of the change

The plan was always to reveal more optional fields into the extensions UI that a back-end developer could use as needed, and a field for number of columns seems like it would be relevant for git-sync.

@josh-lc could I ask you to sanity check that this simple commit will accurately allow for an optional field to be added onto all schemas? I don't want this field to ever show up as an empty value on the schema if it can be helped because I think that gives the impression that it needs a value and it really doesn't.

For context, this field is typically auto-determined on the front-end and we would basically just be adding a field to the schema to override this value.

Type of change

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

Related issues

Fix refractionPOINT/tracking#1

@oklex oklex requested a review from josh-lc November 12, 2024 21:50
@@ -40,6 +40,9 @@ type View struct {
Name string `json:"name" msgpack:"name"`
LayoutType string `json:"layout_type" msgpack:"layout_type"`
DefaultRequests []string `json:"default_requests" msgpack:"default_requests"`

// optional UI view settins: more exist on FE "LayoutOptions" but aren't all exposed via schema
FieldColumns int `json:"field_columns" msgpack:"field_columns"`
Copy link
Contributor

Choose a reason for hiding this comment

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

@oklex looks good, but if you want to omit the return values if there is no value lets do this and that should ensure we don't return a empty value to frontend

FieldColumns int json:"field_columns,omitempty" msgpack:"field_columns,omitempty"

@josh-lc josh-lc self-requested a review November 13, 2024 19:01
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.

2 participants