Related T1909
Details
- Reviewers
vlorentz - Group Reviewers
Reviewers - Commits
- rDWAPPS292c09cc1b2d: Add language selection option
Diff Detail
- Repository
- rDWAPPS Web applications
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/611/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/130/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/612/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/206/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/613/ for more details.
I have added chosen-js plugin for searching and filtering of languages dropdown.
Importing chosen-js in swh/web/assets/src/bundles/vendors/index.js doesn't import the css. On adding imports for css and png separately, webpack fails. I am not able to figure out why ?
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/207/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/207/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/208/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/208/console
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/614/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/209/ for more details.
swh/web/assets/config/webpack.config.development.js | ||
---|---|---|
305 | If we don't need it, yes. |
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/615/ for more details.
I had to use !important everywhere to override the default css. I guess, there must be a way to avoid it.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/210/ for more details.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/616/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/616/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/211/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/211/console
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/617/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/212/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/618/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/213/ for more details.
It's really nice!
Just a few remarks:
- it's unclear what language_select does, especially as it's used both as a list of languages and a boolean to tell whether the language selector should be shown. It should be renamed to available_languages
swh/web/browse/views/utils/snapshot_context.py | ||
---|---|---|
456 | "Override language with user-selected language" | |
swh/web/templates/includes/content-display.html | ||
68 | This currently works because there are no other params, but it would be nice to support other parameters in the URL, so we don't get unexpected bugs later. | |
swh/web/templates/includes/top-navigation.html | ||
133 | {{ language }} seems to be sanitized (when I try values with quotes, eg. http://127.0.0.1:5004/browse/origin/https://github.com/wcoder/highlightjs-line-numbers.js/content/gulpfile.js/?language=foo%22);%20alert(%22hello ), but where? |
swh/web/browse/views/utils/snapshot_context.py | ||
---|---|---|
456 | ok | |
swh/web/templates/includes/content-display.html | ||
68 | I tested it with other params like origin_url, it works. (URLSearchParams stores all params in url) | |
swh/web/templates/includes/top-navigation.html | ||
133 | Django auto-escapes template variables by default. |
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/619/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/214/ for more details.
swh/web/templates/includes/content-display.html | ||
---|---|---|
68 | Indeed, my bad |