Workflow
The following workflow has proven helpful for incorporating Stringtale into your process after you’ve completed Installation.
For developers
Initial setup and usage
- Integrate Stringtale and deploy it to your test / preview environment. Follow the Installation guide if you haven’t already.
- Let your editors make the changes they require (see For editors).
- Either use
stringtale pullto pull their changes into your source code, or let our GitHub Action create a pull request when new edits are available. - Review the changes and merge them into your codebase, ready for release with the next update.
Adding new static text to your project
At some point during the development of your project you’ll have to add new static text. The easiest way to achieve this is by using the ESLint plugin or the VS Code extension.
- Create your component with the static text.
- Select the text you’ve just added.
- Use the ESLint plugin or VS Code extension in your code editor to wrap the text in a
<Value>tag with an automatically generatednameattribute. - The
nameattribute is used to store updates in Stringtale’s database and retrieve them once the text has changed.
Pulling in changes that have been made externally
- Use
stringtale pullto pull in the latest changes from Stringtale. - You’ll notice that any updated
<Value>tags will now have aversionattribute. This is what the CLI uses to determine if the text has to be updated or not. You should not update theversionattribute manually. - Once you’ve reviewed the changes, you can commit them to the repository, ready for the next update.
Manually updating text in your codebase
When using Stringtale, you’re not limited to text changes through the browser. It’s still entirely possible to make changes directly in your codebase.
Change the text in your source 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 editors
For editors 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 Stringtale-enabled text on the page.
- Once you’ve finished making changes, click on
Save changesto save them to Stringtale, ready for the developer to integrate with the next update.