* Add an API page for run-lints endpoint.
* Fix the playwright test.
* Make the check mandatory in the github action.
* Fix a console.log.
* Use a more stable way of waiting for buttons before clicking them.
* Add helper method for dismissing toasts.
* Wait for the other toast.
* Try and fix the flakiness of the toasts.
* Minor fix.
* Upload artifacts at the end of the github action run.
* Fix yaml stuff.
* Use the newer action for uploading. Shorten the retention period to 7 days.
* Add waitForResponse for the entity types API call.
* snapshot.
* Wait for the page to be loaded.
* Make the timeout bigger when waiting for response.
* Try to fix the timeouts.
* Minor restructuring of the test.
* Add another test and few minor todo tests.
* Fix the table names.
* Don't render hcaptcha in test mode.
* Expand the test to include sorting and filtering.
* Add a test for checking if the other schemas are can be listed.
* Make the sort popover button more stable.
* Fix a unused forward ref in the NavMenuItem component.
* Don't render the Toaster container when in test mode.
* Simplify starting the dev server when testing.
* Fix all inputs to have proper test ids.
* Fix the command for testing.
* Add check before generating nodes in settings infrastructure
* Fix conditional in ResourceContent and add some typing
* Wrap checkIfPrivate with try catch
* Add ? in TableEditor.utils generateTableFieldsFromPostgresTable
* More typing
* Add ternary in RPC
* Remove mobx from API docs v1
* Fix renaming folder in storage explorer
* Fix downgrade network error causing UI crash
* Ensure that all try blocks have at least a catch block and not an empty finally block
* Update apps/studio/components/interfaces/Organization/BillingSettings/Subscription/PlanUpdateSidePanel.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* Update
---------
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* 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>
* 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>
* fix(ux): allow creating fk on new column after changing name
Old behavior: If you create a new column, create an FK on that column,
then change the name of the column before saving, FK creation will fail.
This is because the name of the FK source column does not update to
match the changed name.
New behavior: When you change the name of the new column, the FK source
column changes to match, so the FK is created correctly.
* small fix
* Temp hide column privileges warning in column editor for new columns
* Smol fix
* Fix imports
* fix
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* 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>
* 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
* 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>
* initial commit for testing the github action.
* Improvements to the Github action.
* Add docker caching.
* Fix an issue in the github action.
* Another fix for the action.
* Just delete the db after the tests.
* Add a supabase app to the playwright-tests.
* Delete .env.testing.
* Remove the docker image caching from the Playwright github action.
* Add a README.md.
* Add an example test for the table editor.
* Ignore the generated keys.json.
* Add commands for running and writing tests.
* Remove Auth tests.
* Only show the react-query tool when not in test mode.
* Add data-testids to the buttons and use them in the test.
* Handle a case where SUPABASE_URL isn't defined.
* Fix the button test id.
* Remove some dependency.
* Try setting a timeout for an action.
* Add timeout to another action.
* Add some timeouts before the save button.
* Add some timeout before clicking save.
* Enable the video recording only during local testing.
* Minor fixes.
* Expand the README.
* Init foreign keys manage
* Midway
* Midway
* Implement functionality for new foreign key management flow in table editor
* Deprecate old add and remove foreign key queries
* Lint
* Set editor dirty when managing foreign keys
* Add basic validation in new ForeignKeySelector
* Remove FK management in column editor, deprecate old foreign key selector components
* Add validation on columnm types for foreign keys
* Set column type to foreign key type if new column
* Show appropriate notices for when referenced column doesnt match source column type
* fix
* Remove comment
* Lint
* ColumnEditor swap position of data type and Fk
* Add create, update and delete mutations for tables.
* Use the new mutations instead of the table store.
* Fully remove the TableStore from the MetaStore.
* Move the methods from MetaStore into pure functions in SidePanelEditor utils.
* Remove TableStore.
* Refactor the onError callbacks to be on the mutations.
* Convert some of the UIStore invocations.
* Fixed not closing the modal in case of an error. Migrate some uses of uiStore.
* Use onSettled on all RQ hooks.
* Remove the ui param to the create/updateTable functions.
* Add a missing connection string.
* Add progress bar for loading UI for importing rows
* Update apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.utils.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* chore: increase react-query stale time
* keep staleTime: 0 for table rows
* use staleTime: 0 for all user sql queries
* use staleTime: 0 for all pg-meta queries
* Some fixes
* fix updating tables
* fix bug while editing column names
* Fix deleting column in database/tables column list not revalidating UI
* Fix updating column in database/tables column list throwing ane rror
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Do up logic for callback for opening side panel
* Add TextEditor side panel and fix some quirky bugs with JSONEditor too
* Add Markdown Preview in TextEditor
* Fix bad cs
* Fix border css
* Add react-query mutations for columns APIs.
* Use the new delete column mutation.
* Remove the column store and replace all its methods with mutations from react-query.
* Fix type errors.
* Move some the meta store methods to be pure functions in sidepanel.utils.
* Move the createColumn and updateColumn out of the metaStore.
* Some refactors and fixes
* Shift query invalidation when deleting column to mutation file instead of component file
* reorder some code for my sanity
* remove some @ts-ignores
* remove more @ts-ignores
* Update apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.utils.ts
* Fix ForeignKeyFormatter crashing client
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* add privileges page
* fix
* fix: could have both global and column-specific privileges + is global per privilege
* Trigger Build
* load permissions data for current table only
* fix style for light theme
* add a guide to Privileges
* Update apps/docs/pages/guides/auth/column-level-security.mdx
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Update apps/docs/pages/guides/auth/column-level-security.mdx
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
* Update doc
* Update docs
* progress moving privileges to pg-meta
* split up column privileges and table privileges
* adds loading state to toggles
* Add feature flag, move from auth section to database section
* Cleanup
* Update meta store table lists, add header warnings, update docs
* Add alert if any columns have privilages
* Spelling
* fix api.d.ts
* fix link
* move to auth pages
* only show editable schemas
* limit roles
* auto select first table
* remove roles meta store
* inline toggling
* apply privileges all at once
* add preview and use new switch component
* fix spelling
* handle long column names
* warn users about losing changes when changing schemas/tables
* remove strange docs link
* fix feature preview after reload
* use shadcn select
* Update select.tsx
* Minor UX fixes
* Update toast
* Update feature preview image for cls
* update cls warnings
* update warnings
* fix toast message
* Add migration alert to preview page
* Add link to CLS from feature preview, and add empty state on CLS page if feature preview is not enabled
* Shift local storage keys hard code to lib/constants
---------
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Only fetch the tables from the required schema in the MetaStore.
* Don't include the columns in the getTables API call unless a flag is passed.
* Use the new flag in the ForeignKeySelector.
* Columns should be included for the schema visualizer.
* Address comments.
* Move listEncryptedColumns method to a function.
* Remove encryptColumn method since it's unused.
* Add CRUD RQ queries/mutations for vault secrets.
* Use the new queries/mutations.
* Add RQ for secret/decrypted values of secrets.
* Add RQ queries/mutations for pg-sodium keys.
* Use the new hook for decrypted value.
* Use the new hooks for pg sodium keys.
* Remove unneeded code from the vault store.
* Delete VaultStore and all usages of it.
* Small style fix
* Fix invalidation for create, update, delete secrets
* Small UI fixes to EditSecretModal
* Fix invalidation for pg-sodium-keys rq
* Add default error handler for pg sodium keys rq
* Undo
* Add default error handler for vault secrets RQ
* Remove observer on vault pages
* Fix database wrappers with vault
* Add loading state for vault keys
* fix pg sodium keys invalidation
* Opt for immutable const declaration in SecretsManagement
* remove keyId and keyName context from ColumnEditor, no longer supports TLE
* Address PR comments
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Move useEncryptedColumns hook and use it in the TableGridEditor.
* Convert the viewsQuery to use data/fetchers. It also handles invalidation of schemas.
* Invalidate the view when deleting a column or a table.
* Use the new query function in VaultStore.
* Remove the viewStore.
* Fix two more edge cases. Add comments for it.