Skip to content

Commit

Permalink
Feat(Views): Manage data presentation of tables by views (#426)
Browse files Browse the repository at this point in the history
* preparations for views on BE side

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Handover

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* views: Shows all views and displays them

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Enables creating, editing and deleting views

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* feat(views navigation): Show views of all tables beneath them

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* fix(views): Repairing main view functions (Edit, Delete)

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* enh(edit view): Enables Sorting in views

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* enh(view): Enables sharing and integration of views

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* work in progress

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* work in progress

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Implements backend logic for filtering and extracting the relevant rows

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Creates first mockup for frontend filter UI

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fixing after rebase

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Finishes filter ui

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* fixes backend filtering with magic values

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* implements orderBy in the backend

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Implements orderBy in the frontend

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Breaking Change: Replaces tables with base views

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Removes empty filters and sorting rules before saving view

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Create columns from every view and select to which view to add them

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Refactor column menu for frontend view filtering and more

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Enh: New features: Reset view config, save it or create new view with it

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Enh: Menu reordering

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Show meta columns

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Restructures the edit column settings and therefore also the edit column modal

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* fix: Fixing textlink column

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Import now works again

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Global search for views works

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Smart Picker Fix

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Integration of link to a specific row of a table; Preparation for more Link Previews

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Small fixes: Renaming, create shares, selection check filtering

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Implements new permission handling

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Implements new permission handling in the frontend + some adjustments

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Solves unauthorised concurrency problem and fixes column create/edit bugs

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Small fixes

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Small backend fixes

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Design improvements: Edit view

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Design improvements: Column header options

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Design improvements: Sidebar

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Design improvement: Other enhancements like view templates

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Muliple shares are merged correctly to provide the permissions for the share receiver, small refactoring

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fixes migration of existing data

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* First step of cleanup, Solves TODOs

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Second step of cleanup, Format code, linting

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Fixes sharing bugs

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* refactor: Resolving some code reviews

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Propper logging of exceptions

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* fix: permission bug fixes, apply additional frontend filters

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Updated API

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Small bugfix for creating templates

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Refactor: Cleaning php code, exception handling, documentation, etc.

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Security: Send only data from columns from the corresponding view to the frontend

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Import for not base views + Mandatory & parsing check

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Enh/views menu and views modal (#435)

* Enables creating, editing and deleting views

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* enh(view): Enables sharing and integration of views

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* adjust, shorten menus, change icon and fix typo

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* changed icon, add button to reset local view config

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* changed icon, add button to reset local view config

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* changed icon, add button to reset local view config

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* wording: clone -> duplicate

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* cleanup

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

---------

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>
Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
Signed-off-by: Florian <florian.steffens@nextcloud.com>
Co-authored-by: Philipp Hempel <Philipp.Hempel1@web.de>

* WIP: Removes base views, adds dashboard

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* WIP: Adding Table to Dashboard

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fixes most functionality

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* feat: Save/create view with frontend config repaired and improved

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fix: Create view repair, sharing shared elements possible now

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Prepares NcTable component for reusability

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* updated dashboard

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* View settings for hidden properties

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Refactor: reordering of structure of branch and clean up

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* move all modals into a new module
-> modals are independent from any modules etc. so it's good to have them in one place together

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* WIP, update Florian
- Dashboard
     edit table name and emoji
     make edit view and delete view usable
     remove hover-effects
- add delete table modal
- add delete view modal (was inline before)
- cleanup modals structure
- rename some "dashboard" to "Table" names
- add routes and methods to update tables (title && emoji)
- no routing after update view settings by default
- fix typos

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* small bug fixes

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* WIP pgsql compatibility

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Revert row path changes due to bugs and no time to fix

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Implements filter and sorting functionality for PostgreSQL

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fixes bugs: Show views shared with group, jump to created view, open table collapsable with view, improving searching, viewSetting in table

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Fixes small create view bug

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Update and cleanup API

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Show row id in url for row widget

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Small bug fixes

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* psalm fixes

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* WIP add custom smart picker

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* WIP smart picker with content views

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* WIP make NcTable scrollable in widget

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Makes ncTable reusable and thus the widgets working

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* code cleanup

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* fix unit tests

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* ci fixes

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* ci fixes

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* add editTable options

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* cypress fixes

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Small bug fixes and clean up

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* chore: Add cypress project id

Signed-off-by: Julius Härtl <jus@bitgrid.net>

* remove sqlite compatibility temporary

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* limit widget height for table content views

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* ci: Remove cypress debug for cleaner output

Signed-off-by: Julius Härtl <jus@bitgrid.net>

* ci: Record cypress runs in CI

Signed-off-by: Julius Härtl <jus@bitgrid.net>

* adjustments for case-insensitive way

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Update npm deps

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* fix space in column description outputs

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Nicer fox of space in column description outputs

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* fix data-table heading

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Release preparation

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Design: Main Column actions as inline icons to avoid scrolling by default
https://image-us.samsung.com/SamsungUS/support/solutions/apps/APPS_SN_More-options_Share-icon.png?$default-high-resolution-jpg$

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* Fix: Reset and apply view setting

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Improves views dashboard table

Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>

* Move detail info for table or view into sidebar description
remove from dashboard view

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* fix

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* chore: Cleanup unused row widget

Signed-off-by: Julius Härtl <jus@bitgrid.net>

* fix: Hide actions, filter, hide columns in widgets

Signed-off-by: Julius Härtl <jus@bitgrid.net>

* add menu to "data" heading

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* npm update package-lock.json

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* lint fixes

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

* add package-lock.json

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>

---------

Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
Signed-off-by: Philipp Hempel <Philipp.Hempel1@web.de>
Signed-off-by: Florian <florian.steffens@nextcloud.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Co-authored-by: Florian Steffens <florian.steffens@nextcloud.com>
Co-authored-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
3 people authored Aug 11, 2023
1 parent b7e4f61 commit 5def698
Show file tree
Hide file tree
Showing 191 changed files with 20,974 additions and 10,703 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ jobs:
- name: Cypress run
uses: cypress-io/github-action@v4
with:
record: false
wait-on: '${{ env.CYPRESS_baseUrl }}'
working-directory: 'apps/${{ env.APP_NAME }}'
config: defaultCommandTimeout=10000,video=false
Expand All @@ -129,7 +128,6 @@ jobs:
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
npm_package_name: ${{ env.APP_NAME }}
DEBUG: 'cypress:*'

- name: Print logs
if: always()
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 0.6.0-beta.1 - 2023-08-11
### Added
- ⚗️ Add views to tables
- 🤝 Share views individually
- 🛠️ Adjust views with filters, sorting and column selection and ordering
- 🔗 Link to any Nextcloud resource like files, pictures, contacts, deck-cards, etc.
- 📇 New smart picker integrations and link previews
- 🤹 Insert dynamic tables directly into any Nextcloud text editor

### Updated
- 🏳️ Translations
- 🐞 Bug fixing
- ✨ Small design adjustments
- 💾 Update software dependencies

## 0.5.1 - 2023-06-12
### Added
- 💻 OCC command to clean up row data
Expand Down
15 changes: 7 additions & 8 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Share your tables with users and groups within your cloud.
Have a good time and manage whatever you want.
]]></description>
<version>0.5.1</version>
<version>0.6.0-beta.1</version>
<licence>agpl</licence>
<author mail="florian.steffens@nextcloud.com" >Florian Steffens</author>
<namespace>Tables</namespace>
Expand All @@ -33,16 +33,15 @@ Have a good time and manage whatever you want.
<category>office</category>
<website>https://github.com/nextcloud/tables</website>
<bugs>https://github.com/nextcloud/tables/issues</bugs>
<screenshot small-thumbnail="https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-1-small.png">https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-1.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-2.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-3.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-4.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-5.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.5/sh-tables-6.png</screenshot>
<screenshot small-thumbnail="https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-1-small.png">https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-1.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-2.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-3.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-4.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-5.png</screenshot>
<screenshot>https://dl.datenangebot.de/nc%20tables/screenshots/v0.6/sh-tables-6.png</screenshot>
<dependencies>
<database>pgsql</database>
<database>mysql</database>
<database>sqlite</database>
<nextcloud min-version="25" max-version="27"/>
</dependencies>
<commands>
Expand Down
55 changes: 42 additions & 13 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,42 @@
['name' => 'api1#updateTable', 'url' => '/api/1/tables/{tableId}', 'verb' => 'PUT'],
['name' => 'api1#getTable', 'url' => '/api/1/tables/{tableId}', 'verb' => 'GET'],
['name' => 'api1#deleteTable', 'url' => '/api/1/tables/{tableId}', 'verb' => 'DELETE'],
// -> views
['name' => 'api1#indexViews', 'url' => '/api/1/tables/{tableId}/views', 'verb' => 'GET'],
['name' => 'api1#createView', 'url' => '/api/1/tables/{tableId}/views', 'verb' => 'POST'],
['name' => 'api1#getView', 'url' => '/api/1/views/{viewId}', 'verb' => 'GET'],
['name' => 'api1#updateView', 'url' => '/api/1/views/{viewId}', 'verb' => 'PUT'],
['name' => 'api1#deleteView', 'url' => '/api/1/views/{viewId}', 'verb' => 'DELETE'],
// -> share
['name' => 'api1#getShare', 'url' => '/api/1/shares/{shareId}', 'verb' => 'GET'],
['name' => 'api1#indexViewShares', 'url' => '/api/1/views/{viewId}/shares', 'verb' => 'GET'],
['name' => 'api1#indexTableShares', 'url' => '/api/1/tables/{tableId}/shares', 'verb' => 'GET'],
['name' => 'api1#createShare', 'url' => '/api/1/shares', 'verb' => 'POST'],
['name' => 'api1#deleteShare', 'url' => '/api/1/shares/{shareId}', 'verb' => 'DELETE'],
['name' => 'api1#updateSharePermissions', 'url' => '/api/1/shares/{shareId}', 'verb' => 'PUT'],
// -> share -> table
['name' => 'api1#indexTableShares', 'url' => '/api/1/tables/{tableId}/shares', 'verb' => 'GET'],
['name' => 'api1#createTableShare', 'url' => '/api/1/tables/{tableId}/shares', 'verb' => 'POST'],
// -> columns
['name' => 'api1#indexTableColumns', 'url' => '/api/1/tables/{tableId}/columns', 'verb' => 'GET'],
['name' => 'api1#createTableColumn', 'url' => '/api/1/tables/{tableId}/columns', 'verb' => 'POST'],
['name' => 'api1#indexViewColumns', 'url' => '/api/1/views/{viewId}/columns', 'verb' => 'GET'],
['name' => 'api1#createColumn', 'url' => '/api/1/columns', 'verb' => 'POST'],
['name' => 'api1#createTableColumn', 'url' => '/api/1/tables/{tableId}/columns', 'verb' => 'POST'],
['name' => 'api1#updateColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'PUT'],
['name' => 'api1#getColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'GET'],
['name' => 'api1#deleteColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'DELETE'],
['name' => 'api1#updateColumn', 'url' => '/api/1/columns/{columnId}', 'verb' => 'PUT'],
// -> rows -> table
// -> rows
['name' => 'api1#indexTableRowsSimple', 'url' => '/api/1/tables/{tableId}/rows/simple', 'verb' => 'GET'],
['name' => 'api1#indexTableRows', 'url' => '/api/1/tables/{tableId}/rows', 'verb' => 'GET'],
['name' => 'api1#createRow', 'url' => '/api/1/tables/{tableId}/rows', 'verb' => 'POST'],
// -> row
['name' => 'api1#indexViewRows', 'url' => '/api/1/views/{viewId}/rows', 'verb' => 'GET'],
['name' => 'api1#createRowInView', 'url' => '/api/1/views/{viewId}/rows', 'verb' => 'POST'],
['name' => 'api1#createRowInTable', 'url' => '/api/1/tables/{tableId}/rows', 'verb' => 'POST'],

['name' => 'api1#getRow', 'url' => '/api/1/rows/{rowId}', 'verb' => 'GET'],
['name' => 'api1#deleteRowByView', 'url' => '/api/1/views/{viewId}/rows/{rowId}', 'verb' => 'DELETE'],
['name' => 'api1#updateRow', 'url' => '/api/1/rows/{rowId}', 'verb' => 'PUT'],
['name' => 'api1#deleteRow', 'url' => '/api/1/rows/{rowId}', 'verb' => 'DELETE'],
// -> import
['name' => 'api1#createImport', 'url' => '/api/1/import/table/{tableId}', 'verb' => 'POST'],
['name' => 'api1#importInTable', 'url' => '/api/1/import/table/{tableId}', 'verb' => 'POST'],
['name' => 'api1#importInView', 'url' => '/api/1/import/views/{viewId}', 'verb' => 'POST'],


// table
Expand All @@ -50,30 +63,46 @@
['name' => 'table#update', 'url' => '/table/{id}', 'verb' => 'PUT'],
['name' => 'table#destroy', 'url' => '/table/{id}', 'verb' => 'DELETE'],

// view
['name' => 'view#index', 'url' => '/view/table/{tableId}', 'verb' => 'GET'],
['name' => 'view#indexSharedWithMe', 'url' => '/view', 'verb' => 'GET'],
['name' => 'view#show', 'url' => '/view/{id}', 'verb' => 'GET'],
['name' => 'view#create', 'url' => '/view', 'verb' => 'POST'],
['name' => 'view#update', 'url' => '/view/{id}', 'verb' => 'PUT'],
['name' => 'view#destroy', 'url' => '/view/{id}', 'verb' => 'DELETE'],

// columns
['name' => 'column#index', 'url' => '/column/{tableId}', 'verb' => 'GET'],
['name' => 'column#indexTableByView', 'url' => '/column/table/{tableId}/view/{viewId}', 'verb' => 'GET'],
['name' => 'column#index', 'url' => '/column/table/{tableId}', 'verb' => 'GET'],
['name' => 'column#show', 'url' => '/column/{id}', 'verb' => 'GET'],
['name' => 'column#indexView', 'url' => '/column/view/{viewId}', 'verb' => 'GET'],
['name' => 'column#create', 'url' => '/column', 'verb' => 'POST'],
['name' => 'column#update', 'url' => '/column/{id}', 'verb' => 'PUT'],
['name' => 'column#destroy', 'url' => '/column/{id}', 'verb' => 'DELETE'],

// rows
['name' => 'row#index', 'url' => '/row/{tableId}', 'verb' => 'GET'],
['name' => 'row#index', 'url' => '/row/table/{tableId}', 'verb' => 'GET'],
['name' => 'row#show', 'url' => '/row/{id}', 'verb' => 'GET'],
['name' => 'row#create', 'url' => '/row/column/{columnId}', 'verb' => 'POST'],
['name' => 'row#createComplete', 'url' => '/row', 'verb' => 'POST'],
['name' => 'row#indexView', 'url' => '/row/view/{viewId}', 'verb' => 'GET'],
['name' => 'row#create', 'url' => '/row', 'verb' => 'POST'],
['name' => 'row#update', 'url' => '/row/{id}/column/{columnId}', 'verb' => 'PUT'],
['name' => 'row#updateSet', 'url' => '/row/{id}', 'verb' => 'PUT'],
['name' => 'row#destroyByView', 'url' => '/view/{viewId}/row/{id}', 'verb' => 'DELETE'],
['name' => 'row#destroy', 'url' => '/row/{id}', 'verb' => 'DELETE'],

// shares
['name' => 'share#index', 'url' => '/share/table/{tableId}', 'verb' => 'GET'],
['name' => 'share#indexView', 'url' => '/share/view/{viewId}', 'verb' => 'GET'],
['name' => 'share#show', 'url' => '/share/{id}', 'verb' => 'GET'],
['name' => 'share#create', 'url' => '/share', 'verb' => 'POST'],
['name' => 'share#updatePermission', 'url' => '/share/{id}/permission', 'verb' => 'PUT'],
['name' => 'share#destroy', 'url' => '/share/{id}', 'verb' => 'DELETE'],

// import
['name' => 'import#import', 'url' => '/import/table/{tableId}', 'verb' => 'POST'],
['name' => 'import#importInTable', 'url' => '/import/table/{tableId}', 'verb' => 'POST'],
['name' => 'import#importInView', 'url' => '/import/view/{viewId}', 'verb' => 'POST'],

// search
['name' => 'search#all', 'url' => '/search/all', 'verb' => 'GET'],
]
];
1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
projectId: 'ixbf9n',
e2e: {
baseUrl: 'http://nextcloud.local/index.php/',
setupNodeEvents(on, config) {
Expand Down
8 changes: 6 additions & 2 deletions cypress/e2e/tables-table.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ describe('Manage a table', () => {

it('Update title', () => {
cy.get('.app-navigation__list').contains('to do list').click({ force: true })
cy.get('.row.first-row button').click()
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.action-button__text').contains('Edit table').click()

cy.get('.modal-container input').clear().type('ToDo list')
cy.get('.modal-container button').contains('Save').click()

Expand All @@ -37,7 +39,9 @@ describe('Manage a table', () => {

it('Delete', () => {
cy.get('.app-navigation__list').contains('ToDo list').click({ force: true })
cy.get('.row.first-row button').click()
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.action-button__text').contains('Edit table').click()

cy.get('.modal-container button').contains('Delete').click()
cy.get('.modal-container button').contains('I really want to delete this table!').click()

Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ Cypress.Commands.add('createTextLinkColumn', (title, ressourceProvider, firstCol
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Link').click({ force: true })
// deactivate unwanted provider
cy.get('.typeSelection span label').contains('Url').click()
cy.get('.typeSelection span label').contains('Url', { matchCase: false }).click()
cy.get('.typeSelection span label').contains('Files').click()
cy.get('.typeSelection span label').contains('Contacts').click()

ressourceProvider.forEach(provider =>
cy.get('.typeSelection span label').contains(provider).click()
cy.get('.typeSelection span label').contains(provider, { matchCase: false }).click()
)
cy.get('.modal-container button').contains('Save').click()

Expand Down
10 changes: 6 additions & 4 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
use OCA\Tables\Listener\AnalyticsDatasourceListener;
use OCA\Tables\Listener\TablesReferenceListener;
use OCA\Tables\Listener\UserDeletedListener;
use OCA\Tables\Reference\SearchableTableReferenceProvider;
use OCA\Tables\Reference\TableReferenceProvider;
use OCA\Tables\Reference\ContentReferenceProvider;
use OCA\Tables\Reference\LegacyReferenceProvider;
use OCA\Tables\Reference\ReferenceProvider;
use OCA\Tables\Search\SearchTablesProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
Expand Down Expand Up @@ -47,10 +48,11 @@ public function register(IRegistrationContext $context): void {
/** @var IConfig $config */
$config = Server::get(IConfig::class);
if (version_compare($config->getSystemValueString('version', '0.0.0'), '26.0.0', '<')) {
$context->registerReferenceProvider(TableReferenceProvider::class);
$context->registerReferenceProvider(LegacyReferenceProvider::class);
} else {
$context->registerReferenceProvider(SearchableTableReferenceProvider::class);
$context->registerReferenceProvider(ReferenceProvider::class);
}
$context->registerReferenceProvider(ContentReferenceProvider::class);
} catch (NotFoundExceptionInterface|ContainerExceptionInterface $e) {
}

Expand Down
Loading

0 comments on commit 5def698

Please sign in to comment.