This is an admin UI for Drupal, built with JavaScript and based on create-react-app.
Makefile
for guidance.Ensure that you currently have nothing running on port 80 (e.g. a local webserver) or port 3000 (e.g. a local node process). You can run lsof -i :80 -S
to see what you currently have running.
git clone git@github.com:jsdrupal/drupal-admin-ui.git
cd drupal-admin-ui
make build
docker-compose up
(open a new terminal)
make install
If this fails and you see Killed
from composer, you will need to increase your memory allocation for Docker.
You can run your Drupal commands inside the container (e.g. docker exec -it drupal_admin_ui_drupal drush status
).
Instead of first entering the container to run commands (with make drupal:cli
), you can create an alias to run
commands directly in the containers, e.g.
alias admin_ui_drupal='function _admin_ui_drupal() { docker exec -it drupal_admin_ui_drupal $@ };_admin_ui_drupal'
admin_ui_drupal drush status
The Makefile
contains several useful commands! e.g. enabling XDebug.
Open the one time login link in your browser to log into Drupal. You will then have the following available:
URL | Description |
---|---|
http://127.0.0.1 | Regular Drupal installation / JSON API endpoints |
http://127.0.0.1/admin/content | A page taken over by the new admin UI. This uses the bundled version from packages/admin-ui/build , run yarn workspace admin-ui build in the node container to re-build |
yarn workspace @drupal/admin-ui start
will start the Webpack dev sever that comes with Create React App.
We have functional testing with Nightwatch, and component/unit testing with Jest.
When deciding which system to use to add test coverage, the general rule is Nightwatch should be used to test the common path, and Jest can be used for more detailed test coverage. Nightwatch tests will run slower as they simulate clicking around in a real browser.
docker exec -it drupal_admin_ui_drupal drush user:password admin admin
.env.local
file, setting NIGHTWATCH_LOGIN_admin_PASSWORD
to the password you set above e.g. NIGHTWATCH_LOGIN_admin_PASSWORD=admin
NIGHTWATCH_URL=http://127.0.0.1:3000
in the .env.local
file.yarn workspace @drupal/admin-ui build
, which creates a new production build to test.yarn workspace @drupal/admin-ui nightwatch
or yarn test
to run all testsDue to outstanding performance issues, react-axe
is behind a flag. To enable the assessment provided by react-axe
, pass an environment variable when starting the application.
REACT_APP_AXE=true yarn workspace @drupal/admin-ui start
drupal-admin-ui
folder:
git remote rm origin
git remote add origin git@github.com:<your-username>/drupal-admin-ui.git
git remote add upstream git@github.com:jsdrupal/drupal-admin-ui.git
git push origin <your-branch>
git checkout master
git pull upstream master
If someone has made a pull request and you would like to add code to their branch, there are a number of ways to move forward. It will be very helpful to get familiar with managing remotes in Git.
https://github.com/<username>/drupal-admin-ui/settings/collaboration
(although bear in mind this will give access to their entire repository fork)If you're unable to agree, or unable to get in touch with the author, you could create a new pull request that incorporates the work from their branch
git remote add <their-username> git@github.com:<their-username>/drupal-admin-ui.git
git fetch <their-username>
git checkout -b <branch-name> <their-username>/<branch-name>
.
. work, commit things, etc
.
git push <your-fork> <branch-name>
See the documentation in packages/extension-points
for how this tooling works.