Skip to content

Commit 267d6a0

Browse files
authored
Merge pull request #1204 from Nesma775/update-component-library-docs
Update Component Library documentation
2 parents f4063e0 + 11a1a3c commit 267d6a0

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed
Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Component library
2+
title: Component Library
33
tags:
44
- Coding_guidelines
55
- Core_development
@@ -12,49 +12,48 @@ tags:
1212
- Usability
1313
---
1414

15-
The Component Library is a developer tool provided to help identify frequently-used user interface components, and encourage their re-use.
15+
The Component Library is a tool designed for developers to identify frequently used user interface (UI) components and encourage their reuse within Moodle. It includes both components from `Twitter Bootstrap` and Moodle itself. The library provides an organized display of these components, showcasing them with your current Moodle theme.
1616

17-
It includes components from both Twitter Bootstrap, and from Moodle, and it displays these features using your current Moodle theme.
17+
This tool aims to assist developers working on Moodle themes, core features, and extensions by providing easy access to the UI components, which ultimately helps in creating more efficient and consistent user interfaces.
1818

19-
This should help you to work on your theme features, bringing together most of Moodle into one convenient location.
19+
## Who should use the Component Library?
2020

21-
The library is a tool for visual designers, front-end developers, UX developers and anybody creating core Moodle code or Moodle extensions. Its use will allow you to create user interfaces more efficiently.
21+
The Component Library is useful for:
22+
23+
- Visual designers
24+
- Front-end developers
25+
- UX developers
26+
- Anyone working on core Moodle code or creating Moodle extensions.
2227

2328
## Getting started
2429

2530
### Where is the Component Library?
2631

27-
The library is built right into Moodle, but is only shown to developers. You can find it in your site by navigating to Site administration -> Development -> UI Component library.
32+
The library is built into Moodle but is only visible to developers. To access it, navigate to:
2833

29-
If you cannot see "UI Component library" then you will need to build it first - see below.
34+
- **Site administration → Development → UI Component library**
3035

31-
You can also browse the Component Library online http://componentlibrary.moodle.com/admin/tool/componentlibrary/docspage.php/library/getting-started/
36+
If you can't see "**UI Component library**," you'll need to build it first (instructions below). You can also access the online version of the library at [Component Library online](http://componentlibrary.moodle.com/admin/tool/componentlibrary/docspage.php/library/getting-started/).
3237

3338
### Building the Component Library
3439

35-
The Component Library is written using the same Hugo tooling that the Twitter Bootstrap framework uses. It also includes the Bootstrap libraries for the version of Bootstrap used in Moodle.
36-
37-
The library is built from your console, and you will need to install the same NodeJS dependencies that we use for many of our other development features.
38-
39-
See our [Grunt](./nodejs.md#grunt) documentation for information on how to install these dependencies.
40-
41-
Once you have installed the NodeJS dependencies you can then use the [grunt](http://gruntjs.com/) tooling to build the library.:
42-
43-
```console title="Building the component library"
44-
grunt componentlibrary
45-
```
40+
`Hugo` tooling is used to create the Component Library, as is the `Twitter Bootstrap` framework. It includes the necessary `Bootstrap` libraries that correspond to the version used by Moodle.
4641

47-
Simples! What could be easier!?
42+
To build the Component Library, follow these steps:
4843

49-
### What should be documented
44+
1. **Install NodeJS dependencies** (refer to the [Grunt documentation](./nodejs.md#grunt) for installation instructions).
45+
2. Once the dependencies are installed, run the following command in your console:
5046

51-
The main aim of this library is to improve consistency of the user interface to provide a better user (and developer) experience by re-using components across Moodle.
47+
```bash
48+
grunt componentlibrary
49+
```
5250

53-
Whenever a new Moodle feature is created or updated, the building blocks for the UI of the feature should be documented in this library.
51+
This will build the Component Library.
5452

55-
The initial aim is to document any new UI feature which:
53+
## What should be documented?
5654

57-
- is made available in the `core` component, or any core subsystem
58-
- is made available for re-use in a plugin which offers sub-plugins
55+
The main goal of the Component Library is to enhance UI consistency across Moodle. New UI components should be documented within the library whenever:
5956

60-
The documentation of other features will also be welcomed.
57+
- A new Moodle feature is created or updated, especially when it involves UI elements.
58+
- A UI component becomes available for reuse in a plugin that offers sub-plugins.
59+
- Documentation for other UI features will also be welcomed, ensuring that the library grows and helps developers in their work.

0 commit comments

Comments
 (0)