GET /v1/project-folders
) API endpoint for fetching projects in the user’s workspace.
Added fetch projects by project folder id (GET /v1/project-folders/:folder_id/projects
) API endpoint for fetching projects in the specified folder.
GET /v1/components
) API endpoint now supports the includeTimeData
query parameter.
When includeTimeData
is set to true
, the response will include the createdAt
and updatedAt
fields for each component. This feature is only available when the structured
format is used.
index.js
and index.d.ts
files when working with JSON formats.
See the release notes here.
pull
—sample-data flag for variants/v1/variants
now supports the showSampleData
query parameter/v1/variants
for projectIds
query parameternested
format is now supported/components/file
endpoint
now supports a folderId
query parameter. You can supply the Developer ID of one of
your component folders, and all the components will be imported to that folder.
ditto
directory from being created on commands that don’t need it (e.g. generate-suggestions
)
See release notes: https://github.com/dittowords/cli/releases/tag/v4.2.1
--sample-data
flag to the components-folders
command in https://github.com/dittowords/cli/pull/88
See release notes: https://github.com/dittowords/cli/releases/tag/v4.2.0
richText
property on either Ditto
or DittoText
.
This expands rich text support from v1.5.0 which introduced support for rich text on components.
Example:
<Ditto componentId="shopping-cart" richText />
exclude_components
query parameter.exclude_components=true
, only text items not associated with Ditto components will be returned from a given endpoint..strings
, .stringsdict
, and .xml
) has changed.
Variables will now maintain a consistent ordering across base text, variant text, and plural forms; they’re assigned an index according to the order of usage (starting with base text, and then variants), and that index is maintained through variant exports.
For example, consider the following text:
exclude_components
query parameter to the endpoint.true
, only text items not associated with components will be returned from the endpoint.variant_name
and variant-description
.xml
, iOS .strings
, and iOS .stringsdict
formats, a comment is added for each field at the top of the fileflat
format now supports rich text.v1.4.1
fixes a bug introduced in v1.4.0
which caused variables to ignore passed values.import-components
command which enables component imports via a file through the CLI. For information about the command please refer to the documentation in the README.POST /components/file
endpoint to enable uploading components through the API.v3.8.0
of the Ditto CLI.component-folders
command which lists component folders in your workspace. See the release here.-cf
(--component-folder
) flag for generate-suggestions
. See the release here.ios-stringsdict
format in the CLI configuration. See the release here..stringsdict
format to our API. Read more here.
v3.4.0
of the CLI has been published, which adds a -v
, --version
flag to output what version of the CLI is being run.
v1.4.0
, which includes explicit support for map and list variables, in addition to miscellaneous cleanup.
Read about the release here.
__type
property to variable output in our structured export format; this enables simple discrimination between different types of variables:
nested
JSON export format to our API. Read more here.
v3.0.0
of the CLI, which focuses around a number breaking changes intended to better align default CLI behavior with Ditto best practices.
Read the release notes here.
includeRichText
flag to the following endpoints (format must be full or structured):
/projects
/projects/:id
/projects/:id/components
/components
/component-folders/:api*id/components
status
filter as a configuration variable. To filter the fetched text by its status, you can now use the status
parameter in your config.yml
.
android
and ios-strings
as available formats. To use these formats, specify them under the format paramter in your config.yml
.
DITTO_CONFIG_FILE:
used to specify an alternate file location for the CLI to read authentication information from. The default path is $HOME/.config/ditto
.DITTO_TEXT_DIR
: used to specify an alternate folder location for the CLI to write its output files to. The default path is ./ditto
.[TEXT ID]_[PLURAL FORM]
. See the flat format documentation for more details.
Fixed a bug where the status field failed to properly filter returned data when specified in conjunction with the android
or ios-strings
formats.
useDittoSingleText
and useDittoComponent
. These hooks are experimental and will likely undergo API changes in the future.status
field to data returned from the /components
and /projects/:id/components
endpoints.PUT /components
endpoint.\n
, \t
, @
, ?
, '
, and "
characters are now properly escaped.xliff
namespace to exported Android .xml
files.
= Fixed a bug with Android .xml
exports that occurred with text items with API IDs that include the -
character. Now, all -
characters are replaced with \_
characters in the name property of <string>
and <plural>
tags, and a ditto_api_id
property has been added to string and plural tags to serve as a reference to the original API ID.project add
/ project remove
commands and selecting the component library caused incorrect modifications to be made to the CLI’s configuration file.ditto-dir
input parameter for projects that do not have the ditto directory in the root of the repository
PUT /components
.
See our API documentation for more details.
format
query parameter can now accept values of android
or ios-strings
.GET /variables
endpoint that returns the variables in the workspace of the requesting user.GET /projects
GET /projects/:id
GET /projects/:id/components
GET /components
See our API documentation for more details.DITTO_TEXT_DIR
config.yml
file an additional help message displays about verifying that the projects have developer mode enabledDITTO_API_KEY
).config.yml
ditto/config.yml
to allow explicitly specifying that the component library should be fetched and included in the CLI’s output:
components: true
This is now the preferred alternative to the old way of specifying the component library:
GET /projects/:id/components
can now be used to fetch the components used in a projectGET /components
endpointformat
and variant
parameters (the same as the /projects
, /project/:id
, and /components
endpoints)GET /components
can now be used to fetch the components in a workspace
/projects
and /project/:id
endpoints)GET /projects/ditto_component_library
has been deprecated; the endpoint is still available, but references to it have been removed from the documentation.PUT /components
can now be used to update the text of components in a workspace
structured
and flat
formats is saved without arbitrary top-level nestingditto-react
now only works with CLI version 2.x.x
— leaning into new CLI improvements allowed us to drastically reduce many areas of complex logical overheadframeId
, blockId
, textId
, or componentId
values are handledflat
and structured
JSON exports. Now, hidden text will correctly not be included in these export formats!pull
command is executed, all .json
and .js
files are now removed from the ditto
folder prior to new data being written
= Support added for new options in ditto/config.yml
:
variants
: true
or false
format
: flat
or structured
- If specified, data will be fetched and stored in the specified format
= Refactored README
GET /variants
will now return names and API IDs for variants in the workspace associated with the requesting user.flat
and structured formatsvariant
value to DittoProvider
README
ditto-sdk
usage to integrate with a component library instead of an individual projectditto-react
and ditto-cli
support for variantsREADME
, including adding instructions for connecting the repo to a component library/projects
usage in API Reference. The projectIds
query parameter should be specified as follows:
?projectIds[]=<PROJECT_ID>&projectIds[]=<PROJECT_ID>
?projectIds[]=<PROJECT_ID>,<PROJECT_ID>
GET /variants
will now return names and API IDs for variants in the workspace associated with the requesting user.
GET /projects
and GET /projects/:id
now accept an optional query parameter of variant
; when provided, the data exported will be specific to the variant with an API ID that matches the parameter’s value. For default
and structured
formats, the variants key will not be included when the variant parameter is provided./projects/<PROJECT_ID>?variant=xxx-xxx-xxx
GET /projects/:id
will not include top-level projects and project_xyz keys
Example request: GET /projects/123
GET /projects
and GET /projects/:id
now accepts an optional query parameter of format
, which can be either flat
or structured
. If no format is provided, the full
JSON of the project will be returned with blocks and frames.
Example: /projects/<PROJECT_ID>?format=flat
GET /projects/:id
will now return component variants. This applies both for when fetching projects or when fetching the component library (i.e. id = ditto_component_library)GET /projects/:id
will now match the project JSON export from the web-app to include component information (is_comp
and component_api_id
) in the text objecttext.json
.
projectId
prop can be passed to DittoProvider
or Ditto
DittoProvider
, all descendant Ditto
components will default to pulling text from the associated projectDitto
, the component will pull text from the associated projectDittoProvider
and Ditto
, the value passed to Ditto
will take precedenceDitto
component is rendered that is not provided a projectId
via direct prop or DittoContext
ancestor, an error will be thrownditto-react
to v0.0.4
ditto-react
version by passing projectId
props to all instances of DittoContext
text.json
fetched by the CLI. Please upgrade your Ditto CLI via either npm
or yarn
.
GET /project-names
is the new name of the previous GET /projects
endpoint. Just as before, this will return the names and IDs of projects in your Ditto workspace with Developer Mode turned onGET /projects/:id
will now return the structured JSON in a format compatible with multiple projectsGET /projects
is a new endpoint that will return the content of multiple projects (specified via the query parameter projectIds) as a single JSON object/ditto/config.yml
now supports multiple projects. ditto-cli
pull will pull all projects in the current directory’s /ditto/config.yml
/ditto/config.yml
ditto-cli project add
ditto-cli project remove
ditto-cli project
command will now function as ditto-cli project add
GET /projects
now includes the Component Library if Developer Mode is enabled for the Component LibraryGET /projects/:id
will return the Component Library as a structured JSON if the ID provided is ditto_component_library
GET /projects
endpoint for fetching Ditto projects from workspaceGET /projects/:id
endpoint for fetching content in Ditto project as structured JSON