Skip to content

Commit

Permalink
docs: add ADR describing abandonment of Reactstrap (openedx#412)
Browse files Browse the repository at this point in the history
* docs: add ADR describing abandonment of Reactstrap

* Update 0008-abandon-reactstrap.rst

* Update 0005-usage-of-reactstrap.rst
  • Loading branch information
abutterworth authored Apr 8, 2019
1 parent 32773a3 commit 420a82b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/decisions/0005-usage-of-reactstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Status
------

Accepted
Superseded by ADR-0008

Context
-------
Expand Down Expand Up @@ -52,4 +52,4 @@ References
----------

* https://github.com/edx/paragon
* https://reactstrap.github.io/
* https://reactstrap.github.io/
36 changes: 36 additions & 0 deletions docs/decisions/0008-abandon-reactstrap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
5. Abandon Reactstrap
---------------------

Status
------

Draft

Context
-------

As proposed in ADR-0005, we experimented with Reactstrap components in the Profile micro-frontend application. On the plus side, Reactstrap is clean to look at, easy to use and removes the need to know Bootstrap class names to get started.

This comes at the cost of abstracting away raw html and introducing yet another API to learn and remember. In some cases, Reactstrap components serve little purpose: The <Form /> component, for example, offers just one boolean prop (<Form inline />) to toggle the Bootstrap class name "form-inline".

Decision
--------

We will abandon our intention to leverage Reactstrap in Paragon.

Paragon should offer useful tools while keeping developers as close to the html as possible. It should discourage unneccessary abstractions that may create future complications (e.g. passing refs, added difficulty satisfying accessibility needs, conflicts with other tools like Redux forms).

Where we prefer applications to use raw HTML, we should add succinct documentation within Paragon describing the HTML element and its related Bootstrap class names.

Consequences
------------

We will not add passthrough components for Reactstrap.

We will consider adding documentation in Paragon for some raw HTML elements and their related Bootstrap class names (e.g. For input fields: .form-control, .form-control-sm, .form-control-file, etc).

References
----------

* https://github.com/edx/paragon
* https://reactstrap.github.io/

0 comments on commit 420a82b

Please sign in to comment.