Commit Graph

21 Commits

Author SHA1 Message Date
Jonathan Summers-Muir
a4b4167a5b fix: temporary remove default sorting (#28072)
* Update table-rows-query.ts

* Add comment

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-07-19 11:20:58 +08:00
Joshen Lim
e0ae4942f4 Optimize table editor count (#27612)
* Optimize table editor count

* Add additional logic on when to enforce exact count

* Update apps/studio/data/table-rows/table-rows-count-query.ts

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Reset enforceExactCount whenever a filter is applied

* Update showing exact row count warning logic

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2024-07-04 15:27:01 +08:00
Alaister Young
70da0f1d1d chore: cleanup packages (#27770)
* chore: cleanup packages

- Avoid circular imports
- Export API-types as types
- pg-format without depending on Node internal Buffer (not browser-compatible)
- Avoid importing from barrel files in ui dir

* chore: avoid barrel file imports in studio (#27771)

* chore: avoid barrel file imports

- Removes some unused imports
- Avoids barrel file import for faster builds + less memory

* add eslint rule

* type fixes

* delete layouts barrel

* delete components/grid barrel file

* delete components/grid/utils barrel file

* delete components/grid/components/common barrel file

* delete components/grid/components/editor barrel file

* delete components/grid/components/formatter barrel file

* delete components/grid/components/grid barrel file

* delete components/grid/components/header/filter barrel file

* remote components/grid/store barrel file

* remove components/interfaces/Auth/Policies barrel file

* delete components/interfaces/Settings/Logs barrel file

* delete components/ui/CodeEditor barrel file

* delete components/ui/Forms barrel file

* delete components/ui/Shimmers barrel file

* delete data/analytics barrel file

* delete hooks barrel file

* cleanup lib/common/fetch barrel file

* final * barral files cleanup

* global react-data-grid styles

* remove console.log

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>

* fix build

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-07-04 14:48:10 +08:00
Joshen Lim
ae8dafd0a4 Chore/optimizations for table editor query (#27553)
* Optimize table editor select query when cutting off column values

* Fix auto limit logic to consider offset
2024-06-26 17:15:20 +08:00
Terry Sutton
d6f9cb53f9 Set the primary key as the default sort if no other sort exists (#27097)
* Set the primary key as the default sort if no other sort exists

* Rename

* Add contextual toast messages when trying to update/delete row on table with no PKs

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-19 14:58:48 +08:00
Alaister Young
95aa2c6d14 fix: quote get cell value column (#27036) 2024-06-06 13:02:33 +07:00
Alaister Young
8e47d317fa chore: pg-meta functions (#26881)
* start pg-meta functions

* pg meta create function

* pg meta database functions update and delete

* fix ts

* update execute sql error type

* update execute sql error type

* remove duplicate database functions query
2024-06-03 23:21:19 +08:00
Ivan Vasilov
e1cf9d61ae fix: Fix the sort feature in the Table editor (#26865)
* Expand the Sort type with a table property.

* Add a qualifier for the sort when sending a fetch table query.

* Fix the tests.
2024-05-29 17:02:54 -02:30
Joshen Lim
0a0f2260f9 Chore/gracefully handle large text or json in table editor (#26792)
* Support rendering large text/jsons in grid

* Support rendering large json in side panel, and large text in grid

* Support rendering large text in side panel

* Fix

* Update comment

* Fix the editValue type for json fields.

* Fix

* Update blur value

* Fix

* Feex

* Padding bump

* Small refactor

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
2024-05-29 17:10:07 +08:00
Joshen Lim
0d292c668d Contextual error toasts for deleting referenced rows (#23135)
* Contextual error toasts for deleting referenced rows

* Update message
2024-05-02 13:58:52 +08:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Kevin Grüneberg
13cfc0abb5 fix: barrel imports (#21728)
Avoid importing all components via barrel files that lead to bloated bundles/chunks
2024-03-04 18:39:53 +08:00
Alaister Young
36476cee5d chore: disable truncation on delete button only (#20368)
* chore: disable truncation on delete button only

* Remove SqlRowService

* deselect rows on role impersonation change

* switch to react-hot-toast

* Update apps/studio/components/grid/components/header/Header.tsx

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-01-12 17:55:03 +11:00
Alaister Young
6156133cfe fix: truncation while impersonating roles (#20349)
fix: truncation while impersonating
2024-01-11 11:07:28 -03:30
Kevin Grüneberg
d12332ea5a chore: xmas cleanup (#19938) 2024-01-04 17:27:49 +01:00
Kevin Grüneberg
542d984b3e chore: reduce main bundle size (#19918) 2023-12-20 17:49:15 +01:00
Austin Tran
afa8f5ad9a fix: Unable to export data from the table to CSV (#19436)
* fix: Unable to export data from the table to CSV

* Update apps/studio/components/layouts/TableEditorLayout/EntityListItem.tsx

* Prettier

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2023-12-12 10:55:11 -03:30
Alaister Young
35e5b6b87b chore: make returning optional for insert/update queries (#19463)
* chore: make returning optional for insert/update queries

* use arrow function for SupabaseGridLayout

* add success toasts
2023-12-11 08:04:49 +00:00
Alaister Young
9d8e8b068f chore: move role impersonation state into a context (#19510)
* chore: move role impersonation state into a context

* clean up ProjectContext.tsx imports

* move isRoleImpersonationEnabled to only relevant queries
2023-12-11 16:32:11 +11:00
Alaister Young
e6006b9653 feat: user impersonation (#18945)
* feat: user impersonation

* refactor

* add anon impersonation

* add user impersonation to graphiql

* thanks Ivan for this one

* add radio buttons

* progress

* working user selector

* adds loading and error states to user selector

* nicer popover button

* default graphiql to use service role key

* styling updates

* fix padding in graphiql

* add service role warning to graphiql

* add user impersonation to realtime inspector

* add feature flag

* use Alert_Shadcn_ instead of old Alert

* Update apps/studio/lib/role-impersonation.ts

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* update title

* Update apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/Icons.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* Update apps/studio/components/interfaces/RoleImpersonationSelector/UserImpersonationSelector.tsx

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* add constant padding at the bottom of user selector

* update graphiql buttons font size

* make rls warning dismissable

* use text-foreground on rls warning title

* fix no results while impersonating a role

* fix error line number when impersonating a role

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2023-12-04 04:45:11 +00:00
Ivan Vasilov
436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00