Skip to content

Add Nextcloud 33 compatibility#124

Open
bakiburakogun wants to merge 4 commits into
matiasdelellis:masterfrom
bakiburakogun:nc33-compatibility
Open

Add Nextcloud 33 compatibility#124
bakiburakogun wants to merge 4 commits into
matiasdelellis:masterfrom
bakiburakogun:nc33-compatibility

Conversation

@bakiburakogun
Copy link
Copy Markdown

Summary

Fixes #123 — Adds full Nextcloud 33.0.x + PHP 8.4 compatibility.

Changes (16 files)

Breaking Fixes

File Issue Fix
appinfo/info.xml max-version="32" blocks NC33 Bumped to 33
lib/Db/NoteShareMapper.php QueryBuilder::execute() removed in NC33 executeStatement()
lib/Db/TagMapper.php QueryBuilder::execute() removed in NC33 executeStatement()
templates/main.php script()/style() deprecated \OCP\Util::addScript/addStyle

PHP 8.4 Type Safety

File Fix
lib/Controller/NoteApiController.php string $AppName, ?string $userId, ?string $color
lib/Controller/NoteController.php string $AppName, ?string $userId, ?string $color
lib/Controller/AttachmentApiController.php string $AppName, ?string $userId
lib/Controller/SettingsController.php string $appName, ?string $userId
lib/Controller/ShareController.php string $AppName, ?string $userId
lib/Controller/PageController.php string $appName
lib/Service/FileService.php ?string $userId
lib/Service/NoteService.php ?string $color

Migration Fixes (Doctrine DBAL 3.x)

File Fix
lib/Migration/Version000204Date20200530211356.php Removed 'length' from bigint/integer columns
lib/Migration/Version000301Date20200613151711.php Removed 'length' from bigint/integer columns

User Sharing Improvements

File Fix
js/script.js perPage: 50200, added searchUsersSharing() for dynamic AJAX search
js/qn-dialogs.js Replaced static tags mode with query mode (search-as-you-type via sharees API)

Testing

Tested on Nextcloud 33.0.2 with PHP 8.4:

  • ✅ App enables and loads without errors
  • ✅ Create/edit/delete notes works
  • ✅ Tag management works
  • ✅ User sharing finds all users via search
  • ✅ Note sharing/unsharing works
  • ✅ Attachments work
  • ✅ Dashboard widget works
  • ✅ No PHP deprecation warnings in logs

Baki Burak Ogun added 2 commits April 8, 2026 15:15
- Bump max-version from 32 to 33 in info.xml
- Replace deprecated QueryBuilder::execute() with executeStatement() for
  DELETE queries (NoteShareMapper, TagMapper) - removed in NC33
- Add explicit type hints to all constructor parameters to fix PHP 8.4
  implicitly nullable parameter deprecation (, , )
- Replace deprecated script()/style() template helpers with
  \OCP\Util::addScript()/addStyle()
- Remove unsupported 'length' parameter from integer/bigint columns in
  migration files (Doctrine DBAL 3.x+ compatibility)
- Improve user sharing: increase perPage from 50 to 200 and add dynamic
  search-as-you-type via sharees API so all users are discoverable

Tested on Nextcloud 33.0.2 with PHP 8.4
- Replace hardcoded colors (#202124, #808080, #15c, #fff, #000) with
  NC CSS variables (--color-main-text, --color-box-shadow,
  --color-primary-element, --color-main-background, etc.)
- Fix removed --color-primary-light → --color-primary-element-light
- Fix color picker background for dark mode
- Fix medium editor toolbar: all colors now use CSS variables with
  fallbacks for backward compatibility
- Fix note badges (.slim-share, .slim-tag) hover states
- Fix icon header button hover states

All changes use var(--name, fallback) syntax for backward compatibility
with older Nextcloud versions.
Baki Burak Ogun added 2 commits April 8, 2026 18:10
- Add pagination support to _loadUsersSharing via _loadUsersSharingPage
- Increase perPage to 200 and use OCS v2 API endpoint
- Add formatInputTooShort prompt in share dialog
- Fix 'height:' property name typo (trailing colon)
NC33 sets position:fixed on #content, creating a stacking context that
traps .modal-note-background (position:fixed, z-index:9998) below
#header (z-index:2000 in root stacking context).

Additionally, #app-content is a flex item with z-index:1000, which per
CSS spec creates its own stacking context even without explicit position.

Fix: Use CSS :has() selector to conditionally:
- Change #content from position:fixed to position:relative (removes
  stacking context, lets modal escape to root context)
- Set #app-content z-index to auto (removes flex-item stacking context)
- Set overflow:visible on #content (removes overflow:clip)

Also update .modal-note-background z-index from 1051 to 9998 to match
NC33's NcModal .modal-mask, and simplify overlay background.

Closes matiasdelellis#123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nextcloud 33 compatibility - multiple breaking issues

1 participant