mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
Currently, when we update a section of the page with AJAX we replace the entire HTML of the section with the new HTML. This causes problems: - if you’re trying to interact with that section of the page, eg by inpecting it, clicking or hovering an element - (probably) for screenreaders trying to navigate a page which is changing more than is necessary This commit replaces the call to `.html()` with a pretty clever library called diffDOM[1]. DiffDOM works by taking a diff of the old element and the new element, then doing a patch update, ie only modifying the parts that have changed. This is similar in concept to React’s virtual DOM, while still allowing us to render all markup from one set of templates on the server-side. 1. https://github.com/fiduswriter/diffDOM
47 lines
1.3 KiB
JSON
47 lines
1.3 KiB
JSON
{
|
|
"name": "notifications-admin",
|
|
"version": "0.0.1",
|
|
"description": "Admin front end for GOV.UK Notify",
|
|
"engines": {
|
|
"node": "5.0.0"
|
|
},
|
|
"scripts": {
|
|
"test": "gulp lint",
|
|
"build": "gulp",
|
|
"watch": "gulp watch"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/alphagov/notifications-admin.git"
|
|
},
|
|
"author": "Government Digital Service",
|
|
"license": "MIT",
|
|
"homepage": "https://github.com/alphagov/notifications-admin#readme",
|
|
"dependencies": {
|
|
"babel-core": "6.3.26",
|
|
"babel-preset-es2015": "6.3.13",
|
|
"diff-dom": "2.0.3",
|
|
"govuk-elements-sass": "1.1.1",
|
|
"govuk_frontend_toolkit": "4.6.0",
|
|
"govuk_template_jinja": "https://github.com/alphagov/govuk_template/releases/download/v0.17.1/jinja_govuk_template-0.17.1.tgz",
|
|
"gulp": "3.9.0",
|
|
"gulp-add-src": "0.2.0",
|
|
"gulp-babel": "6.1.1",
|
|
"gulp-base64": "0.1.3",
|
|
"gulp-concat": "2.6.0",
|
|
"gulp-include": "2.1.0",
|
|
"gulp-load-plugins": "1.1.0",
|
|
"gulp-sass": "2.2.0",
|
|
"gulp-uglify": "1.5.1",
|
|
"jquery": "1.11.2",
|
|
"query-command-supported": "1.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"gulp-css-url-adjuster": "0.2.3",
|
|
"gulp-jshint": "2.0.0",
|
|
"gulp-sass-lint": "1.1.1",
|
|
"jshint": "2.9.1",
|
|
"jshint-stylish": "2.1.0"
|
|
}
|
|
}
|