Workflow
Getting started with new technology can be challenging. The following workflow has proven helpful for people to incorporate Stringtale into their workflow.
For developers
Initial setup and usage
To get started, you have to integrate Stringtale into your code base and deploy it to your test / preview environment.
- Use
stringtale init
to integrate Stringtale into a new or existing project. For the full guide on how to use this command, please refer to the getting started. - Create an
API key
in the Stringtale Dashboard.- Go to Projects
- Open the project (or click on Edit project settings) you want to deploy to your test / preview environment.
- Scroll down to
Tokens
- Click on
Add Token
and create a new token - Save the token somewhere safe, you’ll need it later.
- Enable ‘Write’ permissions for the newly created token by checking the checkbox for ‘Can write’.
- Deploy your project to your test/preview environment. Add the token you just saved as the environment variable
STRINGTALE_API_KEY
. - Stringtale will now be available in your test / preview environment.
- Let your client make the changes they require.
- Either use
stringtale pull
to pull their changes to your source code or let our GitHub action create a pull request on your next commit. - Review the changes and accept them to your code base, ready for release with the next update.
Adding new static text to your project
At some during the development of your project you’ll have to add new static text to your project. The easiest way to achieve this is by using the ESlint plugin or using the VS Code extension.
- Create your component with the static text.
- Select the text you’ve just added.
- Use the plugin / extension for your editor to wrap the text in a
<Value>
tag with an automatically generatedname
attribute. - The
name
attribute will gets used to store updates in the Stringtale’s database and retrieve those once the text has changed.
Pulling in changes that have been made externally
- Use
stringtale pull
to pull in the latest changes from Stringtale. - You’ll notice that any updated
<Value>
tags will now have aversion
attribute. This is what the CLI uses to deterine if the text has to be updated or not. You should not update theversion
attribute manually. - Once you’ve reviewd the changes, you can commit them to repository, ready for the next update.
Manually updatting text in your code base
When using Stringtale, you’re not limited to text changes through the browser. It’s still entirely possible to make changes directly in your code base.
In order to change the text inside your code base, you only have to change the text in your code base and commit it to your repository. There’s no need
to manually add or update the version
attribute. The version attribute is only used to determine if changes from outside the repository have been made
and need to be pulled in.
For your clients
For clients we’ve streamlined the experience by developing a browser extension. This is the user-friendly alternative to appending
?stringtale
to the URL. This also has the added benefit of not having to reload the page to make changes.
Editing static text
- Install the browser extension from the Chrome Web Store. For more information see our browser extension guide.
- Navigate to the project’s test / preview environment.
- Click on the Stringtale button in your browser’s toolbar.
- Make changes to the text on your website.
- Once you’ve finished making changes, click on
Save changes
to save them to Strintale, ready for the developer to integrate with the next update.