From 566799d701ccb859726ab3f695f2122fadbb4562 Mon Sep 17 00:00:00 2001 From: Breno Calazans Date: Fri, 28 Feb 2020 09:50:20 -0300 Subject: [PATCH] Make Tab label editable through Site Editor --- CHANGELOG.md | 2 ++ manifest.json | 3 ++- messages/context.json | 1 + messages/en.json | 1 + messages/es.json | 1 + messages/pt.json | 1 + store/contentSchemas.json | 14 ++++++++++++++ store/interfaces.json | 5 ++++- 8 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 store/contentSchemas.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a81edc..f18634c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Make tab label editable through Site Editor. ## [0.2.0] - 2020-02-05 ### Added diff --git a/manifest.json b/manifest.json index a311d4f..b6abcc7 100644 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,8 @@ }, "dependencies": { "vtex.styleguide": "9.x", - "vtex.css-handles": "0.x" + "vtex.css-handles": "0.x", + "vtex.native-types": "0.x" }, "$schema": "https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema" } diff --git a/messages/context.json b/messages/context.json index 62f19e7..d465994 100644 --- a/messages/context.json +++ b/messages/context.json @@ -4,6 +4,7 @@ "admin/editor.tabList.title": "admin/editor.tabList.title", "admin/editor.tabList.description": "admin/editor.tabList.description", "admin/editor.tabListItem.title": "admin/editor.tabListItem.title", + "admin/editor.tabListItem.label": "Tab label", "admin/editor.tabListItem.description": "admin/editor.tabListItem.description", "admin/editor.tabContent.title": "admin/editor.tabContent.title", "admin/editor.tabContent.description": "admin/editor.tabContent.description", diff --git a/messages/en.json b/messages/en.json index d0fa099..ef95fff 100644 --- a/messages/en.json +++ b/messages/en.json @@ -4,6 +4,7 @@ "admin/editor.tabList.title": "Tab List", "admin/editor.tabList.description": "Container for tab buttons", "admin/editor.tabListItem.title": "Tab List Item", + "admin/editor.tabListItem.label": "Tab label", "admin/editor.tabListItem.description": "Button with a tabId and label to control visibility of a matching Tab Content Item", "admin/editor.tabContent.title": "Tab Content", "admin/editor.tabContent.description": "Container for the tab panes", diff --git a/messages/es.json b/messages/es.json index d0fa099..a7de0d1 100644 --- a/messages/es.json +++ b/messages/es.json @@ -4,6 +4,7 @@ "admin/editor.tabList.title": "Tab List", "admin/editor.tabList.description": "Container for tab buttons", "admin/editor.tabListItem.title": "Tab List Item", + "admin/editor.tabListItem.label": "Título de la pestaña", "admin/editor.tabListItem.description": "Button with a tabId and label to control visibility of a matching Tab Content Item", "admin/editor.tabContent.title": "Tab Content", "admin/editor.tabContent.description": "Container for the tab panes", diff --git a/messages/pt.json b/messages/pt.json index d0fa099..a5dc8dd 100644 --- a/messages/pt.json +++ b/messages/pt.json @@ -4,6 +4,7 @@ "admin/editor.tabList.title": "Tab List", "admin/editor.tabList.description": "Container for tab buttons", "admin/editor.tabListItem.title": "Tab List Item", + "admin/editor.tabListItem.label": "Título da aba", "admin/editor.tabListItem.description": "Button with a tabId and label to control visibility of a matching Tab Content Item", "admin/editor.tabContent.title": "Tab Content", "admin/editor.tabContent.description": "Container for the tab panes", diff --git a/store/contentSchemas.json b/store/contentSchemas.json new file mode 100644 index 0000000..75a7f85 --- /dev/null +++ b/store/contentSchemas.json @@ -0,0 +1,14 @@ +{ + "definitions": { + "TabListItem": { + "type": "object", + "properties": { + "label": { + "title": "admin/editor.tabListItem.label", + "$ref": "app:vtex.native-types#/definitions/text", + "default": "" + } + } + } + } +} \ No newline at end of file diff --git a/store/interfaces.json b/store/interfaces.json index 5f96bfa..f1134e9 100644 --- a/store/interfaces.json +++ b/store/interfaces.json @@ -10,7 +10,10 @@ "allowed": ["tab-list.item"] }, "tab-list.item": { - "component": "TabListItem" + "component": "TabListItem", + "content": { + "$ref": "app:vtex.tab-layout#/definitions/TabListItem" + } }, "tab-content": { "component": "TabContent",