Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
8b222df
Nuke bootstrap@3.
larseggert Nov 9, 2021
dedbc57
Remove djangobwr and other bower-related things.
larseggert Nov 9, 2021
66d7faf
Remove some empty files and directories.
larseggert Nov 9, 2021
2684253
Remove more unused assets.
larseggert Nov 9, 2021
869507b
Add some ignores
larseggert Nov 9, 2021
2cef8b6
Require django-bootstrap5
larseggert Nov 9, 2021
8efa37e
Dump a bunch of stuff from my local branch into svn.
larseggert Nov 9, 2021
3716d4e
Tweaks for bootstrap5.
larseggert Nov 9, 2021
50cec76
No need to suppress bootstrap3 warning anymore.
larseggert Nov 9, 2021
df25650
bootstrap3 -> django_bootstrap5
larseggert Nov 9, 2021
39d500d
tablesorter -> datatables
larseggert Nov 9, 2021
a8742de
Fix result table.
larseggert Nov 9, 2021
9cf29ba
table-condensed -> table-sm
larseggert Nov 9, 2021
72569dd
Add font-awesome 4.
larseggert Nov 9, 2021
f12bc99
Fix timelines
larseggert Nov 9, 2021
6b15c3d
Fix nav-tabs
larseggert Nov 9, 2021
e92441b
Fix sorter-false
larseggert Nov 9, 2021
94b12af
btn-default -> btn-primary
larseggert Nov 10, 2021
1d55937
Replace glyphicons with bootstrap-icons.
larseggert Nov 10, 2021
726b29b
fontawesome -> bootstrap-icons
larseggert Nov 10, 2021
288b937
django_bootstrap5 removed button/endbutton tags
larseggert Nov 10, 2021
021ba39
Reindent all templates with djhtml
larseggert Nov 10, 2021
7e57e78
Fix search buttons
larseggert Nov 10, 2021
b06e2a0
Fix list-inline
larseggert Nov 10, 2021
f17a7ed
pull-right -> float-end
larseggert Nov 10, 2021
add1dae
Table coloring needs table- prefix.
larseggert Nov 10, 2021
eddc03c
Fix revision list
larseggert Nov 10, 2021
bb5810a
Labels are badges in bs5.
larseggert Nov 10, 2021
e632cc7
Fix buttonlist
larseggert Nov 10, 2021
6b7beb1
panel -> card
larseggert Nov 10, 2021
70a306e
Fix search form.
larseggert Nov 10, 2021
fede7c1
Fix tracking/untracking docs.
larseggert Nov 10, 2021
81805e8
bg-default -> bg-secondary
larseggert Nov 10, 2021
dec56ff
Merge my bs5 changes over.
larseggert Nov 11, 2021
ceb9fb4
Remove old static assets. We'll recover those that we actually need.
larseggert Nov 11, 2021
4125e71
Add eslint to dev dependencies and update the existing configuration.
larseggert Nov 11, 2021
868f583
Simplify the structure some.
larseggert Nov 11, 2021
408f45a
Template fixes, and changes needed to fix templates.
larseggert Nov 11, 2021
333d1c4
Merge ^/personal/lars/7.39.1.dev3
larseggert Nov 12, 2021
273feec
No need for bower anymore.
larseggert Nov 12, 2021
be3a8f7
Add the scripts and dependencies for the agenda page back, and make t…
larseggert Nov 12, 2021
75b5fc1
More agenda template fixes.
larseggert Nov 12, 2021
2a8c231
More agenda fixes.
larseggert Nov 15, 2021
a8764f2
Track CSS class name changes in bs5.
larseggert Nov 15, 2021
a114ad9
More agenda fixes.
larseggert Nov 17, 2021
5772701
And more agenda fixes.
larseggert Nov 18, 2021
e195a00
And more agenda fixes.
larseggert Nov 18, 2021
2b20cca
Switch to list.js
larseggert Nov 22, 2021
ca094a3
More list.js changes.
larseggert Nov 22, 2021
a8aa328
Add space between RFC and number.
larseggert Nov 23, 2021
d5c2299
More list.js fixes.
larseggert Nov 23, 2021
a9738bc
Many more changes related to tablesorter.
larseggert Nov 23, 2021
5174cb3
Merge ^/personal/lars/7.39.1.dev4
larseggert Nov 24, 2021
a189b51
More template changes.
larseggert Nov 24, 2021
9e038d3
Bring back some additional js dependencies.
larseggert Nov 24, 2021
dd59b00
Update some documentation (and convert to Markdown.)
larseggert Nov 24, 2021
089754d
Replace bower with npm/parcel.
larseggert Nov 24, 2021
9e54310
Push some stuff before a mergeable commit.
larseggert Nov 29, 2021
7042038
Remove ietf/templates/iesg/scribe_template.html and related, which is
larseggert Nov 29, 2021
c65f681
Finalize some bs5 templates
larseggert Nov 29, 2021
9a21fca
More bs5 templates
larseggert Nov 30, 2021
448c6db
And more bs5 stuff
larseggert Dec 1, 2021
e254103
More bs5 changes
larseggert Dec 1, 2021
e3b430d
Add ghostscript to app image, which is used by some tests.
larseggert Dec 2, 2021
406aa1e
More fixes
larseggert Dec 2, 2021
1a7ed54
Remove secr static stuff, will re-add whatever is used afterwards.
larseggert Dec 6, 2021
01504d8
More fixes
larseggert Dec 8, 2021
f974fd3
Fix more things
larseggert Dec 9, 2021
e9fd781
Interim commit
larseggert Dec 9, 2021
c68446a
More select2 and test fixes.
larseggert Dec 14, 2021
7f918b0
More test fixes
larseggert Dec 15, 2021
5132661
More test fixes
larseggert Jan 5, 2022
46ca676
When using Docker, the runserver isn't being accessed over loopback, …
larseggert Jan 6, 2022
6fa5fa0
More fixes.
larseggert Jan 6, 2022
373b5db
More fixes.
larseggert Jan 10, 2022
8bc7fde
More fixes.
larseggert Jan 11, 2022
6ca6c35
More fixes.
larseggert Jan 11, 2022
f185da3
Add djhtml (https://github.com/rtts/djhtml), for auto-reformatting of…
larseggert Jan 12, 2022
a5cbf53
More fixes
larseggert Jan 12, 2022
edf3242
More fixes.
larseggert Jan 12, 2022
0bfaa63
More fixes.
larseggert Jan 17, 2022
9c05373
More fixes.
larseggert Jan 18, 2022
cf629a4
And more fixes.
larseggert Jan 25, 2022
335a39d
More fixes.
larseggert Jan 28, 2022
cc723ce
More fixes.
larseggert Jan 31, 2022
53089a9
And more fixes.
larseggert Feb 1, 2022
a507b31
More nits fixed.
larseggert Feb 1, 2022
64d2ba2
Run tidy as part of tests, and fix HTML issues it finds.
larseggert Feb 1, 2022
ed30521
Many more HTML fixes.
larseggert Feb 3, 2022
bbf088e
Hopefully the final check-ins.
larseggert Feb 8, 2022
7a86a1c
Enable select2 for timezone picker.
larseggert Feb 9, 2022
d7ec9e7
Disable various download buttons if there is no agenda yet.
larseggert Feb 9, 2022
02b9720
Add back noscript warning about disabled js.
larseggert Feb 9, 2022
67ebade
A bunch more cosmetic fixes.
larseggert Feb 9, 2022
1795609
Some more cosmetic tweaks.
larseggert Feb 9, 2022
37cb737
Check the selenium console log for any issues as part of the test suite,
larseggert Feb 10, 2022
6c260a5
Merge 7.45.1.dev0 into Bootstrap 5 update branch. Made a first pass a…
jennifer-richards Feb 17, 2022
ca167c0
Hopefully fix #3556.
larseggert Feb 24, 2022
f61ddb4
Make the js a bit less noisy and adjust the tests accordingly.
larseggert Feb 24, 2022
686f835
Fix # 3555.
larseggert Feb 24, 2022
07e0eb8
Properly URL-encode and -decode a bunch of query parameters.
larseggert Feb 24, 2022
9d8f4ea
Fix failing tests
jennifer-richards Feb 24, 2022
2610c7c
Merged in [19978] from personal/lars/7.40.1.dev0
jennifer-richards Feb 24, 2022
c5f86b3
Merged in [19979] from 7.40.1.dev0
jennifer-richards Feb 24, 2022
1d301f7
Merged in [19980] from personal/lars/7.40.1.dev0
jennifer-richards Feb 24, 2022
077e7e2
Merged from 7.40.1.dev0
jennifer-richards Feb 24, 2022
5be2774
Reformat and clean up JS to eliminate warnings
jennifer-richards Feb 24, 2022
686a915
Merge remote-tracking branch 'origin/main' into personal/jennifer/7.4…
jennifer-richards Mar 4, 2022
0ab0994
fix: revert invalid line breaks in templates
jennifer-richards Mar 4, 2022
d78d024
refactor: improve readability of template logic in document_html.html
jennifer-richards Mar 4, 2022
dea0b4e
fix: fix reference to doc.rfc_number in template
jennifer-richards Mar 4, 2022
3906bbd
Merge remote-tracking branch 'origin/main' into personal/jennifer/7.4…
jennifer-richards Mar 7, 2022
3d7b267
fix: only add page navigation panel to compatible templates
jennifer-richards Mar 8, 2022
baa3b29
fix: clean up formatting of login.html template
jennifer-richards Mar 8, 2022
93d3daa
fix: handle remote_instructions field correctly on interim request form
jennifer-richards Mar 8, 2022
64d6736
Merge remote-tracking branch 'origin/main' into personal/jennifer/7.4…
jennifer-richards Mar 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 15 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
module.exports = {
extends: ["eslint:recommended"],
rules: {
indent: [2, 4],
camelcase: 0,
"require-jsdoc": 0,
quotes: [2, "double"],
"no-multiple-empty-lines": [2, {max: 2}],
"quote-props": [2, "as-needed"],
"brace-style": [2, "1tbs", {allowSingleLine: true}]
indent: ["error", 4],
quotes: "off",
"no-multiple-empty-lines": ["error", { max: 2, maxEOF: 0 }],
"quote-props": ["error", "as-needed"],
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
semi: ["error", "always"],
"newline-per-chained-call": ["error"]
},
env: {
browser: true,
jquery: true
jquery: true,
node: true
},
globals: {
d3: true
},
extends: "google"
};
parserOptions: {
sourceType: "module",
ecmaVersion: 2015
}
};
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@
.DS_store
# Simulated Subversion default ignores end here
/.coverage
/.factoryboy_random_state
/.mypy_cache
/.parcel-cache
/.project
/.pydevproject
/.Python
/.settings
/.tmp
/.factoryboy_random_state
/attic
/bin
/etc
/env
/etc
/ghostdriver.log
/htmlcov
/include
Expand All @@ -38,6 +39,7 @@
/mergelog
/mergequeue
/minimum-requirements.txt
/node_modules
/pip-selfcheck.json
/selenium
/settings_local.py
Expand Down
27 changes: 0 additions & 27 deletions LICENSE

This file was deleted.

27 changes: 27 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2008, 2018, The IETF Trust
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
137 changes: 137 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- [Docker Dev Environment](docker/README.md)
- [Continuous Integration](#continuous-integration)
- [Database & Assets](#database--assets)
- [Bootstrap 5 Upgrade](#bootstrap-5-upgrade)

---

Expand Down Expand Up @@ -154,3 +155,139 @@ Additional data files used by the datatracker (e.g. instance drafts, charters, r
https://www.ietf.org/standards/ids/internet-draft-mirror-sites/

> A script is available at `docker/scripts/app-rsync-extras.sh` to automatically fetch these resources via rsync.

---

# Bootstrap 5 Update

An update of the UI to use Bootstrap 5 is under way. The following notes describe this work-in-progress and should
be integrated with the rest of the document as the details and processes become final.

## Intro

We now use `npm` to manage assets for the Datatracker, and `parcel` to
package them. `npm` maintains its `node` packages under `node_modules`.

The Datatracker includes these packages from the various Javascript and
CSS files in `ietf/static/js` and `ietf/static/css`, respectively.
Static images are likewise in `ietf/static/images`.

Whenever changes are made to the files under `ietf/static`, you must
re-run `parcel` to package them:

``` shell
npx parcel build
```

This will create packages under `ietf/static/dist/ietf`, which are then
served by the Django development server, and which must be uploaded to
the CDN.

## Use Bootstrap Whenever You Can

The "new" datatracker uses Twitter Bootstrap for the UI.

Get familiar with <https://getbootstrap.com/getting-started/> and use
those UI elements, CSS classes, etc. instead of cooking up your own.

Some ground rules:

- Think hard before tweaking the bootstrap CSS, it will make it harder
to upgrade to future releases.
- No `<style>` tags in the HTML! Put CSS into the "morecss" block of
a template instead.
- CSS that is used by multiple templates goes into static/css/ietf.css
or a new CSS file.
- Javascript that is only used on one template goes into the "js"
block of that template.
- Javascript that is used by multiple templates goes into
static/js/ietf.js or a new js file.
- Every template includes jquery, so write jquery code and not plain
Javascript. It's shorter and often faster.
- Avoid CSS, HTML styling or Javascript in the python code!

## Serving Static Files via CDN

### Production Mode

If resources served over a CDN and/or with a high max-age don't have
different URLs for different versions, then any component upgrade which
is accompanied by a change in template functionality will have a long
transition time during which the new pages are served with old
components, with possible breakage. We want to avoid this.

The intention is that after a release has been checked out, but before
it is deployed, the standard django `collectstatic` management command
will be run, resulting in all static files being collected from their
working directory location and placed in an appropriate location for
serving via CDN. This location will have the datatracker release version
as part of its URL, so that after the deployment of a new release, the
CDN will be forced to fetch the appropriate static files for that
release.

An important part of this is to set up the `STATIC_ROOT` and
`STATIC_URL` settings appropriately. In 6.4.0, the setting is as follows
in production mode:

```
STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__
STATIC_ROOT = CDN_ROOT + "/a/www/www6s/lib/dt/%s/"%__version__
```

The result is that all static files collected via the `collectstatic`
command will be placed in a location served via CDN, with the release
version being part of the URL.

### Development Mode

In development mode, `STATIC_URL` is set to `/static/`, and Django's
`staticfiles` infrastructure makes the static files available under that
local URL root (unless you set
`settings.SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE` to `False`). It is not
necessary to actually populate the `static/` directory by running
`collectstatic` in order for static files to be served when running
`ietf/manage.py runserver` -- the `runserver` command has extra support
for finding and serving static files without running collectstatic.

In order to work backwards from a file served in development mode to the
location from which it is served, the mapping is as follows:

| Development URL | Working copy location |
| --------------- | --------------------- |
| localhost:8000/static/ietf/* | ietf/static/ietf/* |
| localhost:8000/static/secr/* | ietf/secr/static/secr/*|

## Handling of External Javascript and CSS Components

In order to make it easy to keep track of and upgrade external
components, these are now handled by a tool called `npm` via the
configuration in `package.json`.

## Handling of Internal Static Files

Previous to this release, internal static files were located under
`static/`, mixed together with the external components. They are now
located under `ietf/static/ietf/` and `ietf/secr/static/secr`, and will
be collected for serving via CDN by the `collectstatic` command. Any
static files associated with a particular app will be handled the same
way (which means that all `admin/` static files automatically will be
handled correctly, too).

## Changes to Template Files

In order to make the template files refer to the correct versioned CDN
URL (as given by the STATIC_URL root) all references to static files in
the templates have been updated to use the `static` template tag when
referring to static files. This will automatically result in both
serving static files from the right place in development mode, and
referring to the correct versioned URL in production mode and the
simpler `/static/` URLs in development mode.

## Deployment

During deployment, it is now necessary to run the management command:

``` shell
ietf/manage.py collectstatic
````
before activating a new release.
24 changes: 7 additions & 17 deletions bin/mkrelease
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ while true ; do
shift
done

# ----------------------------------------------------------------------
# Check some requirements

check bower "It is required to update web resources. Install with npm."

# ----------------------------------------------------------------------
# The program itself

Expand Down Expand Up @@ -218,19 +213,15 @@ if [ -z "$PERMIT_MIGR_MIX" ]; then
fi

if [ -z "$IGNORE_RESOURCES" ]; then
note "Updating bower assets ..."
$do ietf/manage.py bower_install > .mkrelease-bower-install.log
$do rm .mkrelease-bower-install.log # This happens at once unless the previous command returns error
$do svn st ietf/externals/static | grep -v '^\?' || true
$do svn commit ietf/externals/static -m "Updated bower-managed static web assets"
# Get rid of bower-installed files which we don't use:
$do rm -rf ietf/externals/static/datatracker/
$do rm -rf ietf/externals/static/jquery.cookie/
$do rm -f $(svn st ietf/externals/ | grep '^\?' | awk '{print $2}')
note "Updating assets ..."
$do npm install > .mkrelease-npm-install.log
$do rm .mkrelease-npm-install.log # This happens at once unless the previous command returns error
$do npx parcel build > .mkrelease-parcel-build.log
$do rm .mkrelease-parcel-build.log # This happens at once unless the previous command returns error
fi

note "Collecting static files ..."
$do ietf/manage.py collectstatic --noinput --ignore=bower.json --ignore='README.*' --ignore=rev | grep -v "Found another file with the destination path"
$do ietf/manage.py collectstatic --noinput --ignore='README.*' --ignore=rev | grep -v "Found another file with the destination path"
#$do svn commit static/lib/ -m "Updated static files under static/lib/"

# note "Checking that there's a recent test-crawler log"
Expand Down Expand Up @@ -344,5 +335,4 @@ cat ~/src/db/mail/release-mail-v$VER.txt | $do mail "${SEND_ARGS}" -s "New datat

# Removed at Henrik's suggestion
#$do toolsfeed control changelog /www/tools.ietf.org/tools/atomfeed.xml
#$do toolpush /www/tools.ietf.org/tools/atomfeed.xml

#$do toolpush /www/tools.ietf.org/tools/atomfeed.xml
14 changes: 0 additions & 14 deletions bootstrap/.editorconfig

This file was deleted.

15 changes: 0 additions & 15 deletions bootstrap/.gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions bootstrap/.gitignore

This file was deleted.

45 changes: 0 additions & 45 deletions bootstrap/.travis.yml

This file was deleted.

Loading