Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment #402

Merged
merged 81 commits into from
Jan 10, 2022
Merged

Deployment #402

merged 81 commits into from
Jan 10, 2022

Conversation

Made it possible to set focus on the items in the dropdowns using the "tab" key, and on the burger when on mobile.
The button appears when the user presses "tab" after the page has loaded (and not having clicked anywhere on the page).

Also had to move `--header-height` from `header.css` to `style.css` for the `.skip-to-main-content` styles.
This makes more sense, as you would probably not refer to a future (not yet started) reservation as "active".
When using SQLite, this migration should apply painlessly. If using any other database management system, one might have to split it into multiple migrations to make it work.

Also, I was unable to set the new `can_view_private` permissions on objects having the old permission (of the same codename) in the migration, so this will have to be updated manually.

Lastly, the changes in `test_utils.py` fixes a crash if multiple permissions shared the same `codename` - made apparent by the migration adding the `can_view_private` permission for both `Article` and `Event`.
This also included adding some querysets/managers for articles and events.
`get_relative_static` tokens in files whose names end with `.interpolated` are replaced with the path of another static file.
In addition to adding unique favicons for the `internal` and `admin` subdomains, this also improves how the site is displayed in various contexts, like as app (shortcut) icons on iOS, Android and Windows 8/10, and on the MacBook touch bar.

All of the files within the `favicons` folders were generated at https://realfavicongenerator.net/.

(Added the comments in `style.css`, to facilitate searching through the codebase for those hex colors, which appear in multiple favicon-related files.)
* Added an SVG favicon for each of the subdomains
* Reordered the <link> tags in `web/favicon.html`, so that the're sorted from lower to higher quality (when multiple icons are appropriate,
  the browser selects the last one; see https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types in the row for "icon")
* Regenerated the contents of the `favicons` folders (using https://realfavicongenerator.net/), as some of the colors in the previously generated
  logos were slightly off compared to the colors in MAKE's graphic charter
* Replaced `rel="shortcut icon"` with `rel="icon"`, as the `shortcut` link type is deprecated (see the same link as above)
# Conflicts:
#	locale/nb/LC_MESSAGES/django.mo
#	locale/nb/LC_MESSAGES/django.po
#	news/templates/news/event_list.html
#	util/test_utils.py
#	web/static/web/css/index.css
#	web/templates/web/index.html
#	web/views.py
Previously, both models had same label for their respective `'can_view_private'` permission.
This makes it a lot easier to read; the ability to change tickets directly from the Event or TimePlace change forms, is not really needed, anyway.
Also slightly improved the field configuration of the admin classes.
Also made `Event.number_of_active_tickets()` and `TimePlace.number_of_active_tickets()` into properties.
This also fixes the cause of a recent error email sent to the Dev committee, which contained the `IndexError` that was previously logged.
This enables us to update the library without having to rename the file.
ddabble and others added 14 commits December 19, 2021 17:15
This was done after feedback on the favicons being too difficult to discern from the background.

Also made the corners of the favicons rounded (50 pt radius - compared to a width/height of 200 pt).
Fix members being unable to have international phone number
# Conflicts:
#	requirements.txt
Fix article image heights + failing tests
…on-and-styling

Subdomain-specific website themes
Make dirtied forms prevent user from leaving
@codecov
Copy link

codecov bot commented Jan 8, 2022

Codecov Report

Merging #402 (bdcb14f) into master (ae2d774) will decrease coverage by 0.97%.
The diff coverage is 76.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
- Coverage   83.71%   82.73%   -0.98%     
==========================================
  Files         118      118              
  Lines        3837     4200     +363     
==========================================
+ Hits         3212     3475     +263     
- Misses        625      725     +100     
Impacted Files Coverage Δ
web/admin_urls.py 88.88% <ø> (ø)
util/admin_utils.py 53.70% <50.98%> (-46.30%) ⬇️
web/multilingual/formfields.py 90.90% <57.14%> (-2.64%) ⬇️
util/html_utils.py 57.14% <60.86%> (+7.14%) ⬆️
news/admin.py 63.12% <62.31%> (-36.88%) ⬇️
faq/admin.py 81.48% <73.68%> (-18.52%) ⬇️
news/views.py 87.54% <80.95%> (-0.15%) ⬇️
internal/models.py 85.27% <85.00%> (-0.19%) ⬇️
internal/admin.py 92.59% <89.47%> (-7.41%) ⬇️
news/models.py 94.83% <95.12%> (+0.35%) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae2d774...bdcb14f. Read the comment docs.

ddabble and others added 9 commits January 10, 2022 17:54
This also fixes an exception when searching through the 3D printer courses, as `'user'` is a related field which has no defined behavior for
searching, and should instead be replaced by e.g. `'user__username', 'user__first_name', 'user__last_name'` - as was done in this commit.
This happened when one or more of the time place's tickets had a user set to `None` (which could have been caused by the user being deleted).
Also removed some previous translations.
…yment

Fix various things before deployment
@ddabble ddabble merged commit 599a393 into master Jan 10, 2022
@ddabble ddabble added the deployment Pull requests from another branch (usually `dev`) into the `main` branch label Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment Pull requests from another branch (usually `dev`) into the `main` branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants