-
Improvement
-
Resolution: Unresolved
-
Low
To better support our documentation, we need to look at how we generate screenshots.
Currently we manually take, crop, and edit screenshots for the documentation. When a new version of Moodle comes out we should then update those screenshots to match the current theme.
This is not a sustainable solution, and it also leads to inconsistent examples in those screenshots.
We need to create a way to automate the generation of these screenshots, using consistent base data, taking into account the current theme(s), and remaining easy-to-maintain.
I suggest that we write a custom Moodle plugin which uses Behat for this purpose. This already provides much of the functionality with only minor additions required.
We would need:
- additional steps for things like:
- adding a highlight around to .dom_selector
- adding an from the [top|left|right|bottom] to .dom_selector
- taking a screenshot of the current viewport
- taking a screenshot of the .dom_selector node
- a way to insert a standard set of data for all tests with things like:
- an agreed site name
- a consistent set of users
- a set of pseudo-realistic course categories and courses
- example images
- example course content
- a map of scenarios/screenshots to documentation image targets
- a system to run the scenarios and to update the documentation with the newly generated content