Skip to content

Commit

Permalink
Schema change to nested facet structure
Browse files Browse the repository at this point in the history
Finder frontend and Government frontend view the nested facets as 2 separate facets. We make it easier by sending them as separate facets with a reference back to their main facet value.
Main facet label is also required to populate the subfacet label in the format `Main facet label - Sub Facet Label` for when JS is disabled.

The changes made in SP now make the use of `sub_facets` field obsolete, but the removal of that field will be done in a separate PR.
  • Loading branch information
minhngocd committed Feb 25, 2025
1 parent 77e6e31 commit f5a5577
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
16 changes: 16 additions & 0 deletions content_schemas/dist/formats/finder/frontend/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,14 @@
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"value": {
"description": "A value to use for form controls",
"type": "string"
Expand All @@ -844,6 +852,14 @@
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"sub_facets": {
"description": "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
"type": "array",
Expand Down
16 changes: 16 additions & 0 deletions content_schemas/dist/formats/finder/notification/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,14 @@
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"value": {
"description": "A value to use for form controls",
"type": "string"
Expand All @@ -957,6 +965,14 @@
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"sub_facets": {
"description": "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
"type": "array",
Expand Down
16 changes: 16 additions & 0 deletions content_schemas/dist/formats/finder/publisher_v2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,14 @@
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"value": {
"description": "A value to use for form controls",
"type": "string"
Expand All @@ -610,6 +618,14 @@
"description": "A human readable label",
"type": "string"
},
"main_facet_label": {
"description": "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
"type": "string"
},
"main_facet_value": {
"description": "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
"type": "string"
},
"sub_facets": {
"description": "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
description: "A value to use for form controls",
type: "string",
},
main_facet_label: {
description: "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
type: "string",
},
main_facet_value: {
description: "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
type: "string",
},
default: {
description: "The default option for a radio facet",
type: "boolean"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
description: "A value to use for form controls",
type: "string",
},
main_facet_label: {
description: "A label that refers to the main facet label of this facet if it is a sub facet. The label is used to generate sub facet labels on frontend apps.",
type: "string",
},
main_facet_value: {
description: "A value that refers to the main facet value of this facet if it is a sub facet. The value is used to group sub facets into sub category groupings for navigational purposes.",
type: "string",
},
sub_facets: {
description: "Possible values to show for non-dynamic select nested facets. All values are shown regardless of the search.",
type: "array",
Expand Down

0 comments on commit f5a5577

Please sign in to comment.