Wen Bo Xie and Kevin Grüneberg
f1541878a9
fix: singularize and capitalize Supabase plans ( #28052 )
...
Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com >
2024-07-18 04:49:00 +00:00
Jordi Enric and Joshen Lim
003cfd6425
feat: warehouse explorer ( #27611 )
...
* add basic feature
* rename to datasource
* rename elements in left sidebar
* update copy in titles in left sidebar
* Add optional 'enabled' parameter in useLogsQuery hook
* Update warehouse query state and components
* add template selector for warehouse query builder
* update deprecated input compo
* fix create token and console warnings
* fix type errors
* fix dupped import
* update endpoints and add missing permissions
* update queries with new api path
* fix type errors
* undo last commit
* undo missing file
* fix imports in logs page
* import fixes
* add settings link like in storage menu
* sort imports, fix form submit
* rename access tokens settings section
* align dropdwn
* add overflow to templates dropdown
* add name as defaultvalue to udpate form
* update rm collection dialog
* capitalize
* Update apps/studio/pages/project/[ref]/logs/explorer/index.tsx
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
* fix typo
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
2024-07-11 12:05:44 +02:00
Alaister Young and Kevin Grüneberg
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
Kevin Grüneberg
f541107196
chore: use new tax id endpoints ( #27246 )
...
Adapts the tax id view to the new MGMT-API endpoints. Users can now only manage a single tax id instead of adding multiple.
Besides
- Use non-deprecated fetchers
- Use Shadcn components
2024-06-19 12:19:20 +08:00
Charis
95062ff952
test: mock next/compat/router ( #27223 )
2024-06-12 19:26:45 -04:00
Jordi Enric
aa84f7f60b
fix warehouse rows & update UI for event detail ( #26891 )
...
* ui fixes, rendering data in warehouse table fixed
* reduce padding in header
* rm test of copy button since it was moved elsewhere
2024-05-31 20:59:28 +02: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
764d10986d
vitest & msw integration ( #26303 )
...
* Fix tests in tests/unit, tests/components and files under tests, looking into tests/pages
* Fix tests under pages/projects root
* Fix
* Comment out broken tests that im stuck with
* Fix api-report.test
* Fix storage-report-test
* chore: fix some tests
* chore: remove logging
* Fix LogsPreviewer.test.js
* Fix most of logs-query-test
* Skip broken tests instead of false positiving them
* Replace jest with vitest
* Rename all *.test.js to *.test.ts
* Configure vitest to work with jsx
* fix vitest issues, fix tests, skip broken tests, add msw, add next-router-mock
* uncomment file
* add tests for msw and nrm
* Fix failing tests
* fix tests in RowEditor
* fix datepicker tests
* fix type errors and comment out tests that need some refactoring
* leave 1 test so test script works
* rm clog and aaaaa
* rename script
* move msw to studio
* add pckg json which i forgot in last commit
* rm consolelog
* move vitest ui dep
* Move next-router-mock to studio.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
Co-authored-by: TzeYiing <ty@tzeyiing.com >
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com >
Co-authored-by: Terry Sutton <saltcod@gmail.com >
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com >
2024-05-29 17:31:20 +02:00
9fd85e76fb
feature: warehouse ( #23714 )
...
* add event collection ui, queries, routing
* fix alignment issue
* renaming
* wip
* feat: initial data hooks and integration with feature flagging
* update with naming, correct mocks, etc
* feat: add source crud integration
* mock data, fix form, add motion to drawer
* feat: optimize warehouse fetch behaviour
* feat: add in valid query
* chore: ermove collection mocks
* feat: optimize tenant fetching
* cleanup + update openapi client + fix fetch calls
* cleanup imporst
* on delete success, redirect to main logs page
* fix dropdown event propagating to link and opening page
* Refactor code to use useParams and useRouter in CreateWarehouseCollection.tsx, WarehouseCollectionDetail.tsx, and LogsLayout.tsx
* clean warehouse query
* warehouse access tokens create, list
* add warehouse access token revokal
* fix access tokens table, fix access tokens revoke feature
* format date in access tokens table
* fix some state issues and warnings in access tokens forms
* warehouse/feat: introduction when creating event collections (#23244 )
feat: add introduction for event collections
* warehouse/feat: rename headers and nav items (#23243 )
* feat: rename headers
* feat: use feature flag for navigation bar
* move header name flag to component
* fix typeerror in create collection query
---------
Co-authored-by: Jordi Enric <jordi.err@gmail.com >
* ui fixes, rm deprecated icons
* render table with events
* fix typeerror results arr
* add pagination
* some ui fixes
* fix loading states, format dates, test connection dialog
* patch type errors
* Fix access token selection in TestCollectionDialog and update column name in WarehouseAccessTokens
* rm unused querytype
* rm unused querytype in logtable
* patch type errors in warhouse collection mutations
* rm unused component
* mr unused import
* show connection dialog in staging
* fix Run btn now showing up
* fix undef argument
* show pagination only when there are results
* fix issues in connection dialog, improve ux
* Update apps/studio/components/interfaces/DataWarehouse/CreateWarehouseAccessToken.tsx
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com >
* Update apps/studio/components/interfaces/DataWarehouse/CreateWarehouseAccessToken.tsx
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com >
* fix infinite render loop, adapt component to render log metadata on log selection
* rm unused import, prevent ui from breaking when some data may be missing from an event
* update WAT create mutation to use template
* follow mutation template in delete access token mutation
* refactor naming, improve code in some areas
* rm unused mocks for msw
* skip tests - this will get fixed on the vitest PR
* Update apps/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
* fix loading compo
* rm unused import
* use correct alert title
* rm unnecessary div
* fix layout in projectpaused alert
* fix type err, refactor to new method
* rm observer
* rm observer
* refactor warehouse collections update
* use correct get method, comment out so it doesnt err
* use correct method
* fix formatting issues
* ref imports
* ref imports
* clean up imports
* clean imports
* clean imports
* rename props
* destructure props
* cleanup imports
* Update apps/studio/components/interfaces/DataWarehouse/CreateWarehouseCollection.tsx
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com >
* ref scale class
* cleanup divs
* Update apps/studio/components/interfaces/DataWarehouse/TestCollectionDialog.tsx
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com >
* refactor to rhf
* reuse types, cleanup, refactor to react query hooks instead of el events
* refactor table component to handle empty state
* Update TestCollectionDialog to use unique keys for SelectItem components
* Update TestCollectionDialog to use unique keys for SelectItem components
* Update TestCollectionDialog to use unique keys for SelectItem components
* fix empty state ui
* use destructured queries
* rename query types
* Update apps/studio/components/interfaces/DataWarehouse/WarehouseAccessTokens.tsx
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com >
* chore: Refactor WarehouseCollectionDetail component
* rm unused imports
* rename loadolder
* rm typcast
* rhf in create token
* improve err handling
* refactor to rhf, refactor queries, use cn utils, cleanup
* fix loading logselection
* add correct type to warehouse access tokens query
* use correct types in err & clean unused types
* toggle token in curl exampel
* use product empty state component in warehouse
* add client side validation of collection name, temp fix
* add New badge
* update testcolldialog
* cleanup unnecessary div and rm double border
* code style fixes
* handle err
* code style fix
* add correct type
* add correct err type
* fix type error
* fix type err
* fix missing type
---------
Co-authored-by: TzeYiing <ty@tzeyiing.com >
Co-authored-by: Ziinc <Ziinc@users.noreply.github.com >
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
2024-05-29 10:32:46 +02:00
Greg Richardson and Charis
3f1df65bba
SQL to REST translator ( #25978 )
...
* feat: sql-to-rest poc
* feat: sql-to-supabase-js poc
* chore: upgrade to libpg-query@15
* feat: sql-to-rest docs tool
* docs(sql-to-rest): add introduction
* docs: wording improvements
* fix: theme
* chore: tailwind placeholder
* feat(sql-to-rest): limit, offset, and range
* feat(sql-to-rest): sort by
* fix(sql-to-rest): ui theme
* feat(sql-to-rest): casts
* feat(sql-to-rest): dynamic faqs in ui
* feat(sql-to-rest): improve ui responsiveness
* feat(sql-to-rest): more advanced faqs in ui
* feat(sql-to-rest): http and curl syntax highlighting
* feat(sql-to-rest): baseUrl in http/curl rendering
* docs(sql-to-rest): clarification on curl flags
* feat(sql-to-rest): more faqs
* refactor(sql-to-rest): split faqs into own file
* refactor(sql-to-rest): move formatters to sql-to-rest package
* docs(sql-to-rest): move page to new tools section
* feat(sql-to-rest): joins and resource embeddings
* chore(sql-to-rest): rename 'convert' to 'translate'
* feat(sql-to-rest): add faqs
* feat(sql-to-rest): ui improvements
* feat(sql-to-rest): faq title adjustment
* feat(sql-to-rest): link to client lib docs
* feat(sql-to-rest): assumptions
* feat(sql-to-rest): friendly 'not supported yet' errors
* feat(sql-to-rest): json columns
* feat(sql-to-rest): remove curl -G flag if unused
* feat(sql-to-rest): better error handling
* chore: revert accidental rls ai work
* fix: build errors
* fix(sql-to-rest): theme
* feat(sql-to-rest): change base url
* feat(sql-to-rest): basic aggregate poc
* feat(sql-to-rest): group by
* feat(sql-to-rest): more group by checks
* feat(sql-to-rest): count(*) special case
* fix(sql-to-rest): tests
* feat(sql-to-rest): faq on 'and' operator
* fix(sql-to-rest): error messages
* fix(sql-to-rest): multiple filters on same column
* refactor(sql-to-rest): error hints
* feat(sql-to-rest): match and imatch
* feat(sql-to-rest): in operator
* feat(sql-to-rest): parsing error hints
* feat(sql-to-rest): default language to curl
* feat(sql-to-rest): format on cmd+s
* feat(sql-to-rest): format initial value
* fix(sql-to-rest): turn off tab query group
* feat(sql-to-rest): improve wording in error messages
* feat(sql-to-rest): animated code blocks
* feat(sql-to-rest): more error hints
* fix(sql-to-rest): strip primary relation prefix from columns
* feat(sql-to-rest): json column in order by clause
* feat(sql-to-rest): validate all referenced relations exist in from clause
* refactor(sql-to-rest): split core sql-to-rest lib into separate repo
* feat(sql-to-rest): upgrade to v0.1.1
* feat(sql-to-rest): upgrade to v0.1.2
* feat(sql-to-rest): upgrade to v0.1.4
* chore: upgrade libpg-query
* feat: update 'create a pr' link
* fix: app builds
* fix: prettier
* fix: typecheck
* fix: studio tests
* chore: remove console.log
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com >
* docs(sql-to-rest): remove broken link to client libraries
---------
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com >
2024-05-22 12:37:01 -06:00
Joshen Lim and TzeYiing
d025e0f739
chore/fix studio jest tests ( #25872 )
...
* Fix tests in tests/unit, tests/components and files under tests, looking into tests/pages
* Fix tests under pages/projects root
* Fix
* Comment out broken tests that im stuck with
* Fix api-report.test
* Fix storage-report-test
* chore: fix some tests
* chore: remove logging
* Fix LogsPreviewer.test.js
* Fix most of logs-query-test
* Skip broken tests instead of false positiving them
---------
Co-authored-by: TzeYiing <ty@tzeyiing.com >
2024-05-11 12:05:25 +02:00
Charis
5d8cef6040
fix: update all examples and snippets to use select for auth rls func… ( #22632 )
...
fix: update all examples and snippets to use select for auth rls functions
2024-04-11 12:56:11 -04:00
b361544461
fix(studio): empty arrays become empty string in row editor ( #16882 )
...
* fix(studio): empty arrays become empty string in row editor
* test: update test case to match the new parseValue behavior
---------
Co-authored-by: Ryan Martin <rmrt1n@users.noreply.github.com >
Co-authored-by: Han Qiao <sweatybridge@gmail.com >
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
2024-03-27 11:22:50 +07:00
Joshen Lim
4327d58df5
Hybrid RLS Assistant ( #21806 )
...
* Midway checking on hybrid rls assistant
* Demo
* Midway
* Polish + hook up everything for policy creation
* Temp fix for open in sql editor
* Resolve conflicts
* Support updating policies with new hybrid ui
* Fix generateQuery for altering policies
* Update to support feature preview
* Fix spelling lint
* Addressing small bugs
* Fix
* Clean upo
* Add new MultiSelectV2 in ui-patterns, use in RLS editor
* More clean uo
* Fix RadioGroupLargeItem label cursor state when disabled
* Lint lowercase sql
2024-03-25 16:02:50 +07:00
Joshen Lim
948a2390fe
Final replacements of ui setNotification with toast ( #21885 )
...
* Final replacements of ui setNotification with toast
* Rip out UiStore
* Rip out UiStore
* Shift files under authConfigSchema to components/Auth
* Rip out use of observers
2024-03-12 12:56:56 +08:00
Ivan Vasilov and Joshen Lim
845167ca14
chore: Delete MetaStore and RootStore ( #20034 )
...
* Replace all methods of MetaStore with react queries.
* Remove unneeded usages of MetaStore.
* Remove RootStore completely. The only thing left from these stores is uiStore.
* Remove unnecessary comments.
* Delete MetaStore.
* Fix the usage of the wrong toaster.
* Remove unused variables
* Remove onSqlQuery
* Convert some ui setNotification calls to direct toast calls
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
2024-03-08 14:56:28 +08:00
Kyle Rummens
523f241067
Fix/#21742 format stats chart numbers ( #21760 )
...
fix: format numbers in statistics charts on hover
2024-03-05 15:11:17 +00:00
Faizan Rasool and Joshen Lim
31fca2d7ea
remove trailing commas ( #20781 )
...
* remove trailing commas
* test cases added
* Opt for immutable way in JsonEditor
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
2024-02-05 14:41:07 +08:00
Kevin Grüneberg
d12332ea5a
chore: xmas cleanup ( #19938 )
2024-01-04 17:27:49 +01: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