Skip to content

Commit

Permalink
feat: archive deprecated components
Browse files Browse the repository at this point in the history
Archive the Form validator and Rich text editor components

Whilst we will continue to support them, they are no longer recommended
  • Loading branch information
gregtyler committed Apr 25, 2022
1 parent ed0f09c commit 3a8dedd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 14 deletions.
8 changes: 0 additions & 8 deletions docs/_includes/layouts/component.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,13 @@
text: 'Add another',
href: ('/components/add-another' | url)
},
{
text: 'Form validator',
href: ('/components/form-validator' | url)
},
{
text: 'Multi file upload',
href: ('/components/multi-file-upload' | url)
},
{
text: 'Password reveal',
href: ('/components/password-reveal' | url)
},
{
text: 'Rich text editor',
href: ('/components/rich-text-editor' | url)
}
]
},
Expand Down
25 changes: 22 additions & 3 deletions docs/components/archived-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,38 @@ layout: layouts/component.njk
title: Archived components
---

MOJ components are archived when similar components are published in the GOV.UK Design System. You should use the GOV.UK Design System component instead.
MOJ components are archived when similar components are published in the GOV.UK Design System, or when it is no longer practical to support them.

### Contents

- [Currency input](#currency-input)
- [Form validator](#form-validator)
- [Rich text editor](#rich-text-editor)
- [Tag](#tag)

## Currency input

[Currency input](../currency-input) was archived on 23 June 2021.
[Currency input](../currency-input) was archived on 23 June 2021.

You should use [prefixes and suffixes](https://design-system.service.gov.uk/components/text-input/#prefixes-and-suffixes) in the GOV.UK Design System to help users enter things like currencies.

## Form validator

[Form validator](../form-validator) was archived on 20 April 2022.

This component was deemed not sufficiently accessible to be used in live services and too complex to maintain.

You must validate forms on the server-side. If you require client-side validation, start with [native browser form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation#using_built-in_form_validation).
For more complex validation, use an accessible validation library.

## Rich text editor

[Rich text editor](../rich-text-editor) was archived on 20 April 2022.

This component was deemed not sufficiently accessible to be used in live services and too complex to maintain.

You should use an accessible rich text editor like [TinyMCE](https://www.tiny.cloud/tinymce/).

## Tag

Additional colours of [Tag](../tag) was archived on 23 June 2021.
Expand Down
8 changes: 8 additions & 0 deletions docs/components/form-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ layout: layouts/component.njk
title: Form validator
---

{% banner "This component is archived" %}

This component is not sufficiently accessible to be used in live services.

You must validate forms on the server-side. If you require client-side validation, start with [native browser form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation#using_built-in_form_validation).
For more complex validation, use an accessible validation library.
{% endbanner %}

{% lastUpdated "form-validator" %}

{% example "/examples/form-validator", 1000 %}
Expand Down
10 changes: 7 additions & 3 deletions docs/components/rich-text-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ layout: layouts/component.njk
title: Rich text editor
---

{% banner "This component is archived" %}

This component is not sufficiently accessible to be used in live services.

You should use an accessible rich text editor like [TinyMCE](https://www.tiny.cloud/tinymce/).
{% endbanner %}

{% lastUpdated "rich-text-editor" %}

{% example "/examples/rich-text-editor", 300 %}
Expand All @@ -29,6 +36,3 @@ You can also add bold, underline and italic buttons but these styles should be u
You can customise the formatting options shown in the toolbar with the `data-moj-rich-text-editor-toolbar` attribute.

{% example "/examples/rich-text-editor-formatting", 300 %}



0 comments on commit 3a8dedd

Please sign in to comment.