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

0.16 into develop #11460

Merged
merged 221 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
9238464
Change the way we check for Android to use Python internals.
rtibbles Aug 8, 2023
7bb6cfb
Add utility to manage and evict chunked files.
rtibbles Sep 26, 2023
2f1f14c
Tweak storage calc logic to prevent double counting incomplete downlo…
rtibbles Sep 26, 2023
44f8613
Use streamed file cache clear as a last resort when there's insuffici…
rtibbles Sep 26, 2023
2eb8f41
Add method to limit_files to a specific total number of bytes.
rtibbles Sep 26, 2023
b24bb37
Separate out default task scheduling into separate plugin, and add to…
rtibbles Sep 26, 2023
ea0772f
Add scheduled task for cleaning up the streamed file cache.
rtibbles Sep 26, 2023
8ca431d
Sort file names to avoid inconsistency of os.walk on different file s…
rtibbles Sep 27, 2023
2b35350
Optimize os.walk usage.
rtibbles Sep 28, 2023
6f3e5a5
Raise when the channel cannot be found on the remote.
rtibbles Sep 30, 2023
1e7107f
Update device provisioning serializer to allow associating a created …
rtibbles Oct 4, 2023
2644c03
Always collect and send superuser info except for on my own setup.
rtibbles Oct 4, 2023
e30af52
Update package versions for latest publish.
rtibbles Oct 8, 2023
f06a0a8
Catch any request exception and raise a LocationError instead.
rtibbles Oct 8, 2023
db42132
Mark Completed ContentDownloadRequests as pending when the associated
rtibbles Oct 8, 2023
32e4bd2
Bump launch-editor-middleware from 2.6.0 to 2.6.1
dependabot[bot] Oct 9, 2023
17225f9
Fix order in which notification updates are commited to state
MisRob Oct 5, 2023
a18fffb
Replaced KResponsiveWindow mixin by useKResponsiveWindow composable -…
FireSuperior482 Oct 9, 2023
abc863b
Merge pull request #11373 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 9, 2023
f7d16cf
Bump csv-parse from 5.5.1 to 5.5.2
dependabot[bot] Oct 10, 2023
e67339e
Merge pull request #11374 from MisRob/fix-notifications-order
rtibbles Oct 10, 2023
7f026dd
Merge pull request #11370 from rtibbles/dev5kolibri-tools
rtibbles Oct 10, 2023
da0cba2
Merge pull request #11376 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 10, 2023
338b3a8
Download page displays in sidenav only when download permissions perm…
marcellamaki Aug 24, 2023
c14586a
Add download progress polling, remove download before complete, disab…
marcellamaki Aug 29, 2023
7164551
Fixing prop warning topics page
marcellamaki Aug 29, 2023
145a142
conditionalize failure errors based on source device network availabi…
marcellamaki Aug 30, 2023
817324b
PR feedback implementation
marcellamaki Sep 15, 2023
4247069
Update useDevices composable to contain a networkDevices object which…
marcellamaki Sep 15, 2023
a92e54e
Misc. cleanup of downloads related files
marcellamaki Sep 15, 2023
69d1c10
refactor fetchDevices polling and networkDevices ref per feedback, to…
marcellamaki Sep 19, 2023
52b18fb
Refactor useDevices, and update ExploreLIbrariesPage to use the new n…
marcellamaki Sep 25, 2023
ed7b7f0
Update references to baseurl, instanceId, and deviceName based on cha…
marcellamaki Sep 25, 2023
25cd51a
Ensure networkDevices is correctly imported into DownloadsList, where…
marcellamaki Sep 25, 2023
3387d79
Address review feedback
marcellamaki Sep 26, 2023
c348541
Address PR feedback, fix downloads page reactivity problems
marcellamaki Sep 27, 2023
355bbe2
Update useDevices mock in accordance with composable updates
marcellamaki Sep 28, 2023
b6da8b3
Fix error with topicsMore by setting as Boolean()
marcellamaki Sep 28, 2023
b8ba2aa
Improve loading state on ExploreLibraries page by updating loading se…
marcellamaki Sep 28, 2023
781a58c
Update MyDownloads page to fetch before waiting for polling, and add …
marcellamaki Sep 28, 2023
234e6cd
add icon for on device
marcellamaki Sep 28, 2023
c1686c1
Move setting page name and loading to after the logged in guard
marcellamaki Sep 29, 2023
8f45a20
Update Library page (which was not updated with new composable change…
marcellamaki Oct 5, 2023
c112a37
rename functions for clarity about responsibilities and purposes
marcellamaki Oct 5, 2023
de98a18
fix nextTick error
marcellamaki Oct 6, 2023
d54cb3d
Fix download pagination with re-fetch, to appropriately reset the pag…
marcellamaki Oct 6, 2023
4f5c488
Fix pagination redirect when no items left in the page
marcellamaki Oct 6, 2023
31a08cc
Ensure learner cannot download resource from content page when downlo…
marcellamaki Oct 6, 2023
a2d6ab7
Update tests for download button display conditions, which were updat…
marcellamaki Oct 10, 2023
7b7817d
Clean up unused styles in coach.
rtibbles Oct 10, 2023
5b83298
Remove use of learn specific height styling in the html5 renderer.
rtibbles Oct 10, 2023
8b8e240
Remove references to learn specific toolbar heights in PDF renderer.
rtibbles Oct 10, 2023
0421d87
Clean up use of renderers in lesson content previews.
rtibbles Oct 10, 2023
886f50f
Merge pull request #11177 from marcellamaki/my-downloads-polling-ui-u…
rtibbles Oct 10, 2023
589f025
Tweak logic for highlighting current node to use id rather than conte…
rtibbles Oct 10, 2023
3276949
Adds a touch events check before showing the bottom navigation on tou…
akolson Oct 11, 2023
e1ac2b2
Removes breakpoints check
akolson Oct 11, 2023
543c9ec
Merge pull request #11340 from rtibbles/raise_for_no_channel
bjester Oct 11, 2023
d62ec64
Merge pull request #11384 from rtibbles/current_id
rtibbles Oct 11, 2023
28bfafa
Merge pull request #11352 from rtibbles/lod_osuser
rtibbles Oct 11, 2023
c7adfa1
Updates the AppBar page breakpoints
akolson Oct 11, 2023
8be7ef7
Allow content requests to be filtered by contentnode_id and contentno…
rtibbles Sep 15, 2023
22ad0a6
Fetch download requests for all resources by id filtering.
rtibbles Sep 15, 2023
5c8c6df
Fetch download request specifically for the displayed resource.
rtibbles Oct 10, 2023
278a3cf
Clean up reactivity of newly initiated downloads.
rtibbles Oct 11, 2023
8163f56
Fix improper lookup for download source.
rtibbles Oct 11, 2023
bfb5f0f
Move download request polling logic into composable.
rtibbles Oct 11, 2023
65e29c4
Poll for download requests on the topics content page.
rtibbles Oct 11, 2023
083f128
Delete all associated request objects.
rtibbles Oct 11, 2023
108a0f5
Run cache cleanup task hourly.
rtibbles Oct 11, 2023
5404810
Clean up references to elementHeight and elementWidth.
rtibbles Oct 11, 2023
704a31d
Attempt to fix issues seemingly caused by global loading state not be…
rtibbles Oct 11, 2023
e5e9453
Reset to page 1 of download pagination when a filter is selected.
rtibbles Oct 11, 2023
a563e2d
Bump @babel/preset-env from 7.22.20 to 7.23.2
dependabot[bot] Oct 12, 2023
c5a3afd
Merge pull request #11395 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 12, 2023
b6b9027
Bump @babel/plugin-transform-runtime from 7.22.15 to 7.23.2
dependabot[bot] Oct 12, 2023
34027f2
Merge pull request #11396 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 12, 2023
44c69e5
fixes inconsistencies on resizable apps
akolson Oct 12, 2023
0fbcc1a
Merge pull request #11383 from rtibbles/all_renderers_great_and_small
rtibbles Oct 12, 2023
263d027
Also mark completed non user initiated requests as pending.
rtibbles Oct 12, 2023
07878d9
Add z-index to fix display of HybridLearningFooter dropdown menu
LianaHarris360 Oct 12, 2023
6420f8a
Create task to run user initiated removal cleanup.
rtibbles Oct 12, 2023
29dc43c
Run resource cleanup on removal.
rtibbles Oct 12, 2023
fd6474f
Update useDeviceRestart composable to play better with disconnection …
rtibbles Oct 12, 2023
3edcc08
Use canRestart to gate editing of paths.
rtibbles Oct 12, 2023
c4fa9d6
Do proper diff checking in the device settings API to do a proper PATCH.
rtibbles Oct 12, 2023
d50031f
Use all of useDeviceRestart composable to display a modal to a user w…
rtibbles Oct 12, 2023
b357649
If anything was saved, refresh the page to ensure any bootstrapped de…
rtibbles Oct 12, 2023
9eceee4
Merge pull request #11072 from rtibbles/robustly_android
rtibbles Oct 12, 2023
ab65f72
Adds loaders to all class route page components or nearest relevant c…
rtibbles Oct 12, 2023
6987292
Bump @testing-library/jest-dom from 6.1.3 to 6.1.4
dependabot[bot] Oct 13, 2023
c04e88e
Bump @babel/core from 7.23.0 to 7.23.2
dependabot[bot] Oct 13, 2023
1d24fe9
Bump commander from 11.0.0 to 11.1.0
dependabot[bot] Oct 13, 2023
5ad265a
Merge pull request #11404 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 13, 2023
702db75
Merge pull request #11405 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 13, 2023
afcf788
Merge pull request #11406 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 13, 2023
fb3a607
modified to python3
a6ar55 Oct 13, 2023
f5e25aa
Merge pull request #11391 from rtibbles/which_downloads_pacifically
rtibbles Oct 13, 2023
350266b
Merge pull request #11399 from LianaHarris360/fix-menu-dropdown-display
rtibbles Oct 13, 2023
bfd9a6c
Update removeDownloadRequest function to take contentnode_id as argum…
rtibbles Oct 12, 2023
dd3e24f
Simplify responsive display.
rtibbles Oct 12, 2023
ef9a11b
Merge pull request #11304 from rtibbles/stale_chunks
rtibbles Oct 13, 2023
40acc47
Fix content download request removal for MyDownloads page.
rtibbles Oct 13, 2023
98a8ca9
Show snackbar when resource is removed.
rtibbles Oct 13, 2023
50e1295
Remove KCircularLoader to conform to loader standards.
rtibbles Oct 13, 2023
bcec99c
Add connection status filter in useDevices composable so network devi…
marcellamaki Oct 13, 2023
06c4207
Update snackbar behaviour to only show snackbar when settings have be…
rtibbles Oct 13, 2023
94a2a22
Fix dirty and stale cache issues.
rtibbles Oct 13, 2023
2a54e3c
Fix bottom bar alignment and menu label which was previously offscreen
marcellamaki Oct 13, 2023
d382ab9
Merge pull request #11409 from marcellamaki/connection-status
rtibbles Oct 13, 2023
ff2950e
Merge pull request #11411 from marcellamaki/app-bar-ux-tweaks
rtibbles Oct 13, 2023
c9b579f
Fix explore libraries page route handler to prevent eternal loading s…
rtibbles Oct 13, 2023
9e4df55
Consolidate devices with channels state handling into use devices com…
rtibbles Oct 13, 2023
486b54a
Fix display of cards and channels and add transition.
rtibbles Oct 13, 2023
b44c9fc
Use ifaddr directly for querying local IPs.
rtibbles Oct 13, 2023
50f58e4
Bump webpack from 5.88.2 to 5.89.0
dependabot[bot] Oct 16, 2023
6016b48
Merge pull request #11416 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 16, 2023
782260a
Merge pull request #11402 from rtibbles/cleanup_on_aisle_5
bjester Oct 16, 2023
7afbd3e
Merge pull request #11413 from rtibbles/better_urls
rtibbles Oct 16, 2023
c490c75
Fixes sub navigation disappearance in mac apps
akolson Oct 16, 2023
fa54ebd
Move contentnode removal propagation function to standalone utility.
rtibbles Oct 16, 2023
782aa60
Revert addition of loading state that waited for long timeout.
rtibbles Oct 16, 2023
56a6a5c
Merge pull request #11372 from rtibbles/update_content_request_status…
bjester Oct 16, 2023
97ef6c4
Allow email in username in KolibriAbstractBaseUser
Oct 16, 2023
9e35cd0
FacilityUserSerializer will still block emails as usernames
Oct 16, 2023
a33876c
updated base image from to jammy,removed build.txt
a6ar55 Oct 16, 2023
d94d70d
Update docker env var for which python version to use
bjester Oct 16, 2023
845d001
Merge pull request #11408 from a6ar55/release-v0.16.x
bjester Oct 16, 2023
1727a34
Update useDevices mock.
rtibbles Oct 17, 2023
50047f0
Bump webpack-merge from 5.9.0 to 5.10.0
dependabot[bot] Oct 17, 2023
1166d08
Merge pull request #11421 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 17, 2023
ad308de
Merge pull request #11397 from rtibbles/bo_select_all
marcellamaki Oct 17, 2023
e1b6d2c
Merge pull request #11392 from rtibbles/quiz_score_report
rtibbles Oct 17, 2023
2066029
Merge pull request #11393 from rtibbles/you_wouldnt_download_a_car
marcellamaki Oct 17, 2023
b35ea97
Merge pull request #11386 from akolson/fix-bottom-nav-disappearance
rtibbles Oct 17, 2023
3aa24e4
Move isTouchDevice into the browserInfo utils.
rtibbles Oct 17, 2023
031f67a
Update touch device testing in perseus.
rtibbles Oct 17, 2023
340b75e
Merge pull request #11424 from rtibbles/touch_perseus
rtibbles Oct 17, 2023
994fc31
Merge pull request #11403 from rtibbles/how_refreshing
marcellamaki Oct 17, 2023
b2e2c2e
Change username max length to 254 to be compliant with RFCs 3696 and …
Oct 17, 2023
57c6aa3
Tests for changes in the model and serializer
Oct 17, 2023
da922b7
Prevent perpetual loading state by only setting loading state when sh…
rtibbles Oct 17, 2023
7668709
Add a loader when libraries are loading.
rtibbles Oct 17, 2023
eed9944
Update deviceChannelsMap to be a ref instead of reactive to get rid o…
rtibbles Oct 17, 2023
df71ae8
Catch channel fetches so that we never end up in a perpetual loading …
rtibbles Oct 17, 2023
632cbd0
Separate other libraries into another component to prevent unnecessary
rtibbles Oct 17, 2023
024bb69
Fix tests, remove unneeded loader that is displayed to the side with …
rtibbles Oct 17, 2023
788e186
set css position on transcript based on window breakpoint
nucleogenesis Oct 11, 2023
61db914
can just set position properly w/ existing CSS rules updates
nucleogenesis Oct 17, 2023
4519014
remove unused
nucleogenesis Oct 17, 2023
011f13d
Simplify pinned devices backend.
rtibbles Oct 17, 2023
d77e76b
simplify pinned devices composable to match backend updates.
rtibbles Oct 17, 2023
ce85959
Use morango UUIDField for consistency of representation.
rtibbles Oct 17, 2023
1fc8921
Consolidate pinned device state logic in usePinnedDevices composable.
rtibbles Oct 18, 2023
6424333
Define validation functions in models
Oct 18, 2023
d8a84a1
Keep deviceChannelsMap up to date.
rtibbles Oct 18, 2023
02d552f
Improve responsiveness and fix reactivity of pinning and unpinning.
rtibbles Oct 18, 2023
fca2015
Ensure that the last pinned device getting unpinned show unpinned dev…
rtibbles Oct 18, 2023
a6fca60
Conform card display to spec. Limit number of unpinned devices.
rtibbles Oct 18, 2023
6d9ce4c
Adding padding in ViewMore button (#11398)
thesujai Oct 18, 2023
58f02e8
Update usePinnedDevice mocks to fix tests.
rtibbles Oct 18, 2023
1a91893
Bump vue-loader from 15.10.2 to 15.11.1
dependabot[bot] Oct 19, 2023
23c7ebf
Bump @types/jest from 29.5.5 to 29.5.6
dependabot[bot] Oct 19, 2023
472f066
Merge pull request #11429 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 19, 2023
3c012b2
Merge pull request #11430 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 19, 2023
34e4f09
Pin KDS to version 2.0.0-beta0
MisRob Oct 19, 2023
883e83a
Make site title configurable via the theme hook.
rtibbles Oct 19, 2023
b24d587
Let's simplify if username attr is not provide
Oct 19, 2023
beb3c8c
Merge pull request #11425 from jredrejo/allow_email_in_usernames
jredrejo Oct 19, 2023
32a030b
Create ResourceSyncingUiAlert around MissingResourceAlert to use in L…
marcellamaki Oct 19, 2023
304b9c6
Conditionalize for LODs
marcellamaki Oct 19, 2023
549cdd2
Update display conditions to include whether or not the sync has comp…
marcellamaki Oct 19, 2023
fb20f2e
Fix condition so the slot is conditional to LOD not the entire banner
marcellamaki Oct 19, 2023
f7e2a72
Clean up content link composable.
rtibbles Oct 20, 2023
50d0d57
Fix sorting bug that was always putting Studio last instead of first.
rtibbles Oct 20, 2023
d86f0d9
Create card layout span composable and use it instead of provide inject.
rtibbles Oct 20, 2023
c667cbf
Consolidate pin handling logic into pinned devices composable.
rtibbles Oct 20, 2023
90f34dd
Simplify LibraryItem API to allow reuse in OtherLibraries.
rtibbles Oct 20, 2023
73e220a
Update OtherLibraries to use LibraryItem.
rtibbles Oct 20, 2023
b6ae7ca
Update mocks and add data-test and defensive checks to fix tests.
rtibbles Oct 20, 2023
8ad47ab
Upgrade le utils and add migration for new preset.
rtibbles Oct 20, 2023
f85ab30
Mark the HTML5 viewer as supporting the IMSCP preset.
rtibbles Oct 20, 2023
208e757
Update conditions to be less restrictive. Syncing status updates to b…
marcellamaki Oct 20, 2023
1657d5d
Fix bug that stopped the number of channels being properly shown.
rtibbles Oct 20, 2023
3b66a3d
Ensure More and Explore button are always inline to prevent overflow …
rtibbles Oct 20, 2023
e9f5a51
Merge pull request #11419 from rtibbles/library_paging
rtibbles Oct 20, 2023
5546795
Keep current back link when navigating through the topics folder side…
rtibbles Oct 20, 2023
73d0834
Rename variable to make it clear it is always a folder.
rtibbles Oct 22, 2023
e10da93
Update kolibri/core/templatetags/core_tags.py
rtibbles Oct 22, 2023
5b13eff
Ensure that we only filter content download requests when there is a …
rtibbles Oct 22, 2023
a1df76f
Update user sync status endpoint to return if sync initiated download…
rtibbles Oct 22, 2023
ca33e27
Use sync downloads being in progress to conditionalize message display
rtibbles Oct 22, 2023
d706612
Merge pull request #11433 from rtibbles/site_title
rtibbles Oct 22, 2023
c1c0872
Bump core-js from 3.33.0 to 3.33.1
dependabot[bot] Oct 23, 2023
0a698c7
Fix incorrect display of welcome modal for guest user
ozer550 Oct 23, 2023
93bca27
fix linting
ozer550 Oct 23, 2023
62f3114
Merge pull request #11385 from nucleogenesis/fix--mobile-vid-transcripts
nucleogenesis Oct 23, 2023
0f98b53
Merge pull request #11435 from rtibbles/backlinks
marcellamaki Oct 23, 2023
bd1b333
Rehydrate the home page when syncing has completed to refresh missing…
rtibbles Oct 23, 2023
bcc470c
Merge pull request #11436 from rtibbles/imscp
rtibbles Oct 23, 2023
6b3d577
Merge pull request #11426 from marcellamaki/intermediate-lesson-loadi…
rtibbles Oct 23, 2023
7253df0
Bump eslint-plugin-import from 2.28.1 to 2.29.0
dependabot[bot] Oct 24, 2023
78993d2
priority of tasks can be declared via the API (#11445)
im-NL Oct 24, 2023
ad4c606
Merge pull request #11447 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 24, 2023
48800cf
Bump actions/setup-node from 3 to 4
dependabot[bot] Oct 24, 2023
cdba002
Merge pull request #11450 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 24, 2023
7fb25aa
Merge pull request #11452 from learningequality/dependabot/github_act…
rtibbles Oct 24, 2023
a08ab52
Pin KDS to version 2.0.0-beta1
MisRob Oct 24, 2023
2a683b4
Merge branch 'release-v0.16.x' into pin-kds
MisRob Oct 24, 2023
c4a8ac2
Relaxes freespace permissions
akolson Oct 11, 2023
f870c9b
fixes available storage bug
akolson Oct 12, 2023
f0ec413
Streamlines storage of space to bytes in the backend
akolson Oct 13, 2023
72ef54d
Fixes conflicts on rebase
akolson Oct 13, 2023
6f6b075
Uses pure calculations for gigabyte conversions
akolson Oct 14, 2023
263936a
fixes collapsing label when size limit is set to 0
akolson Oct 17, 2023
5686106
Merge pull request #11449 from ozer550/Fix_Welcome_Modal_Message
marcellamaki Oct 24, 2023
28918e3
Merge pull request #11431 from MisRob/pin-kds
rtibbles Oct 24, 2023
19c3384
Merge pull request #11412 from akolson/fix-available-storage-not-calc…
marcellamaki Oct 24, 2023
f3a0f0d
Bump xstate from 4.38.2 to 4.38.3
dependabot[bot] Oct 25, 2023
041ff47
Merge pull request #11454 from learningequality/dependabot/npm_and_ya…
rtibbles Oct 25, 2023
fea24d0
Merge branch 'release-v0.16.x' into develop
rtibbles Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_whl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
apt-get -y -qq update
apt-get install -y gettext sudo
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Install Yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Cache Node.js modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
python-version: '3.11'
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Get yarn cache directory path
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Get yarn cache directory path
Expand Down
24 changes: 14 additions & 10 deletions docker/base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic
FROM ubuntu:jammy

ENV NODE_VERSION=16.20.0

Expand All @@ -11,29 +11,33 @@ RUN apt-get update && \
git \
git-lfs \
psmisc \
python2.7 \
python-pip \
python-sphinx
python3 \
python3-pip \
python3-sphinx

# add yarn ppa
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# install nodejs and yarn
RUN apt-get update && \
curl -sSO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
rm nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
ARCH=$(dpkg --print-architecture) && \
curl -sSO https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \
dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \
rm nodejs_$NODE_VERSION-1nodesource1_$ARCH.deb && \
apt-get install yarn

RUN git lfs install

# Check if symbolic links exist before creating them
RUN if [ ! -f /usr/bin/python ]; then ln -s /usr/bin/python3 /usr/bin/python; fi \
&& if [ ! -f /usr/bin/pip ]; then ln -s /usr/bin/pip3 /usr/bin/pip; fi

# copy Kolibri source code into image
COPY . /kolibri

# do the time-consuming base install commands
RUN cd /kolibri \
&& pip install -r requirements/dev.txt \
&& pip install -r requirements/build.txt \
&& pip install -r requirements/test.txt \
&& pip3 install -r requirements/dev.txt \
&& pip3 install -r requirements/test.txt \
&& yarn install --network-timeout 100000
1 change: 0 additions & 1 deletion docker/demoserver.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM learningequality/kolibribase

ENV KOLIBRI_RUN_MODE=demoserver
ENV KOLIBRI_PROVISIONDEVICE_FACILITY="Kolibri Demo"
ENV WHICH_PYTHON=python2

COPY docker/entrypoint.py /docker/entrypoint.py

Expand Down
2 changes: 1 addition & 1 deletion docker/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# - KOLIBRI_PROVISIONDEVICE_FACILITY if set, provision facility with this name
# - CHANNELS_TO_IMPORT if set, comma separated list of channel IDs to import
DEFAULT_ENVS = {
"WHICH_PYTHON": "python2", # or python3 if you prefer; Kolibri don't care
"WHICH_PYTHON": "python3", # or python3 if you prefer; Kolibri don't care
"KOLIBRI_HOME": "/kolibrihome",
"KOLIBRI_HTTP_PORT": "8080",
"KOLIBRI_LANG": "en",
Expand Down
3 changes: 3 additions & 0 deletions kolibri/core/assets/src/composables/useUserSyncStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const deviceStatus = ref(null);
const deviceStatusSentiment = ref(null);
const hasDownloads = ref(false);
const lastDownloadRemoved = ref(null);
const syncDownloadsInProgress = ref(false);
const timeoutInterval = computed(() => {
return get(status) === SyncStatus.QUEUED ? 1000 : 10000;
});
Expand Down Expand Up @@ -51,6 +52,7 @@ export function pollUserSyncStatusTask() {
lastDownloadRemoved.value = syncData[0].last_download_removed
? new Date(syncData[0].last_download_removed)
: null;
syncDownloadsInProgress.value = syncData[0].sync_downloads_in_progress;
} else {
status.value = SyncStatus.NOT_CONNECTED;
}
Expand Down Expand Up @@ -83,5 +85,6 @@ export default function useUserSyncStatus() {
deviceStatusSentiment,
hasDownloads,
lastDownloadRemoved,
syncDownloadsInProgress,
};
}
2 changes: 2 additions & 0 deletions kolibri/core/assets/src/core-app/apiSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ import * as sync from '../views/sync/syncComponentSet';
import PageRoot from '../views/PageRoot';
import NotificationsRoot from '../views/NotificationsRoot';
import useMinimumKolibriVersion from '../composables/useMinimumKolibriVersion';
import useUserSyncStatus from '../composables/useUserSyncStatus';
import useUser from '../composables/useUser';

// webpack optimization
Expand Down Expand Up @@ -232,6 +233,7 @@ export default {
useKShow,
useMinimumKolibriVersion,
useUser,
useUserSyncStatus,
},
},
resources,
Expand Down
6 changes: 6 additions & 0 deletions kolibri/core/assets/src/utils/browserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,9 @@ export const isMacWebView =
* All web views
*/
export const isEmbeddedWebView = isAndroidWebView || isMacWebView;

// Check for presence of the touch event in DOM or multi-touch capabilities
export const isTouchDevice =
'ontouchstart' in window ||
window.navigator?.maxTouchPoints > 0 ||
window.navigator?.msMaxTouchPoints > 0;
10 changes: 7 additions & 3 deletions kolibri/core/assets/src/views/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<UiToolbar
:title="title"
:removeNavIcon="isAppContext && !windowIsLarge"
:removeNavIcon="isAppContext && isTouchDevice"
type="clear"
textColor="white"
class="app-bar"
Expand All @@ -19,7 +19,7 @@
:removeBrandDivider="true"
>
<template
v-if="windowIsLarge || !isAppContext"
v-if="windowIsLarge || !isAppContext || !isTouchDevice"
#icon
>
<KIconButton
Expand Down Expand Up @@ -104,7 +104,7 @@
<!-- Window size and app context. Changes may need to be made -->
<!-- in parallel in both files for non-breaking updates -->
<div
v-if="!windowIsLarge && !isAppContext"
v-if="!windowIsLarge && (!isAppContext || (isAppContext && !isTouchDevice))"
class="subpage-nav"
>
<slot name="sub-nav"></slot>
Expand All @@ -121,6 +121,7 @@
import UiToolbar from 'kolibri.coreVue.components.UiToolbar';
import KIconButton from 'kolibri-design-system/lib/buttons-and-links/KIconButton';
import themeConfig from 'kolibri.themeConfig';
import { isTouchDevice } from 'kolibri.utils.browserInfo';
import useKResponsiveWindow from 'kolibri.coreVue.composables.useKResponsiveWindow';
import navComponentsMixin from '../mixins/nav-components';
import SkipNavigationLink from './SkipNavigationLink';
Expand Down Expand Up @@ -160,6 +161,9 @@
usernameForDisplay() {
return !hashedValuePattern.test(this.username) ? this.username : this.fullName;
},
isTouchDevice() {
return isTouchDevice;
},
},
created() {
if (this.isLearner) {
Expand Down
9 changes: 8 additions & 1 deletion kolibri/core/assets/src/views/BottomNavigationBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@
<KIconButton
icon="menu"
:ariaLabel="coreString('menuLabel')"
size="small"
:color="navShown ? $themeTokens.primary : $themeTokens.annotation"
@click="$emit('toggleNav')"
/>
<p :style="{ color: $themeTokens.primary }">{{ coreString('menuLabel') }}</p>
<p
v-if="navShown"
class="nav-menu-label"
:style="{ color: $themeTokens.primary }"
>
{{ coreString('menuLabel') }}
</p>
</span>
</div>

Expand Down
12 changes: 8 additions & 4 deletions kolibri/core/assets/src/views/SideNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
</div>
</div>
<div
v-if="!isAppContext || windowIsLarge"
v-if="!isAppContext || !isTouchDevice || windowIsLarge"
class="side-nav-header"
:style="{
height: topBarHeight + 'px',
Expand Down Expand Up @@ -251,6 +251,7 @@
import Backdrop from 'kolibri.coreVue.components.Backdrop';
import LanguageSwitcherModal from 'kolibri.coreVue.components.LanguageSwitcherModal';
import TotalPoints from 'kolibri.coreVue.components.TotalPoints';
import { isTouchDevice } from 'kolibri.utils.browserInfo';
import navComponentsMixin from '../mixins/nav-components';
import useUser from '../composables/useUser';
import useUserSyncStatus from '../composables/useUserSyncStatus';
Expand Down Expand Up @@ -325,6 +326,9 @@
username: state => state.core.session.username,
fullName: state => state.core.session.full_name,
}),
isTouchDevice() {
return isTouchDevice;
},
width() {
return this.showAppNavView ? '100vw' : `${this.topBarHeight * 4.5}px`;
},
Expand All @@ -337,11 +341,11 @@
// Window size and app context. Changes may need to be made
// in parallel in both files for non-breaking updates
// The expected behavior is:
// In an app context, on small and medium screens,
// show the app Nav
// In an app context, on screens with touch capabilities,
// show the app Nav.
// In browser based contexts, and large screen app view
// use the "non-app" upper navigation bar
return this.isAppContext && !this.windowIsLarge;
return this.isAppContext && this.isTouchDevice;
},
footerMsg() {
return this.$tr('poweredBy', { version: __version });
Expand Down
28 changes: 28 additions & 0 deletions kolibri/core/auth/migrations/0024_extend_username_length.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2023-10-17 17:51
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

import kolibri.core.auth.models


class Migration(migrations.Migration):

dependencies = [
("kolibriauth", "0023_change_extra_fields_validator"),
]

operations = [
migrations.AlterField(
model_name="facilityuser",
name="username",
field=models.CharField(
help_text="Required. 254 characters or fewer.",
max_length=254,
validators=[kolibri.core.auth.models.validate_username],
verbose_name="username",
),
),
]
34 changes: 25 additions & 9 deletions kolibri/core/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
from .permissions.general import IsAdminForOwnFacility
from .permissions.general import IsOwn
from .permissions.general import IsSelf
from kolibri.core import error_constants
from kolibri.core.auth.constants.demographics import choices as GENDER_CHOICES
from kolibri.core.auth.constants.demographics import DEFERRED
from kolibri.core.auth.constants.demographics import NOT_SPECIFIED
Expand Down Expand Up @@ -344,6 +345,27 @@ def infer_dataset(self, *args, **kwargs):
)


validate_username_allowed_chars = validators.RegexValidator(
r'[\s`~!@#$%^&*()\-+={}\[\]\|\\\/:;"\'<>,\.\?]',
"Enter a valid username. This value can contain only letters, numbers, and underscores.",
code=error_constants.INVALID,
inverse_match=True,
)

validate_username_max_length = validators.MaxLengthValidator(
30, "Required. 30 characters or fewer. Letters and digits only"
)


def validate_username(value):
try:
validators.validate_email(value)
except ValidationError:
# for kolibri backwards compatibility, if the username is not an email:
validate_username_allowed_chars(value)
validate_username_max_length(value)


class KolibriAbstractBaseUser(AbstractBaseUser):
"""
Our custom user type, derived from ``AbstractBaseUser`` as described in the Django docs.
Expand All @@ -360,15 +382,9 @@ class Meta:

username = models.CharField(
"username",
max_length=30,
help_text="Required. 30 characters or fewer. Letters and digits only",
validators=[
validators.RegexValidator(
r'[\s`~!@#$%^&*()\-+={}\[\]\|\\\/:;"\'<>,\.\?]',
"Enter a valid username. This value can contain only letters, numbers, and underscores.",
inverse_match=True,
)
],
max_length=254,
help_text="Required. 254 characters or fewer.",
validators=[validate_username],
)
full_name = models.CharField("full name", max_length=120, blank=True)
date_joined = DateTimeTzField("date joined", default=local_now, editable=False)
Expand Down
19 changes: 18 additions & 1 deletion kolibri/core/auth/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import logging

from django.core.exceptions import ValidationError as DjangoValidationError
from django.core.validators import MinLengthValidator
from django.db import transaction
from rest_framework import serializers
Expand All @@ -21,6 +22,8 @@
from .models import LearnerGroup
from .models import Membership
from .models import Role
from .models import validate_username_allowed_chars
from .models import validate_username_max_length
from kolibri.core import error_constants
from kolibri.core.auth.constants.demographics import NOT_SPECIFIED

Expand Down Expand Up @@ -70,7 +73,21 @@ def save(self, **kwargs):
return instance

def validate(self, attrs):
username = attrs.get("username")
username = attrs.get("username", None)
if username is not None:
# in case a patch request does not provide username attribute
try:
validate_username_allowed_chars(username)
except DjangoValidationError as e:
raise serializers.ValidationError({"username": e.message})

try:
validate_username_max_length(username)
except DjangoValidationError as e:
raise serializers.ValidationError(
{"username": e.message}, code=error_constants.MAX_LENGTH
)

# first condition is for creating object, second is for updating
facility = attrs.get("facility") or getattr(self.instance, "facility")
if (
Expand Down
Loading
Loading