* 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.
* Add database policies RQ and shift all usage of policies from pg meta mobx to RQ
* Deprecate and remove policies store from pg meta mobx store
* Fix policies not showing by table and schema
* Update create policy mutation body
* Hide RLS assistant features for orgs with HIPAA
* Replace all usage of meta.publications with react query
* Deprecate publications store from meta store mobx, shift updateTableRealtime logic to SidePanelEditor
* Address comments
* chore: improve loading on table editor index page
* fix margin on no results
* make TableEditorLayout non-blocking by default
* change no search results text
* 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>
* Assign keys to each side panel editor on the table editor to ensure that input fields have the latest data
* move rowsPerPage to valtio + more cleanup
* remove sidepanel row optimistic updates
* Change prop for listbox in input field from default value to value
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
* set up multiple themes in studio
* set up multiple themes in studio
* set up multiple themes in docs and www
* update all resolvedTheme to also include deep-dark
* update all resolvedTheme checks to also include deep-dark
* update tailwind.config.js tokens
* update tailwind.config.js tokens
* update leftover scale12 token
* update if resolvedTheme _doesn't_ include 'dark'
* update more styling tokens
* add dynamic themes to CmdK
* fix nav and footer for multi theme
* add data-theme selector output to transformTokens.js
* update code-hike.css to target data-theme css
* update tailwindcss to ^3.3.5
* ThemeImage with light and dark src for www and docs
* add brand-button styling token
* update old dark theme boolean
* update old dark theme boolean
* make homepage product visuals themeable
* update product page themed images
* update badge green with brand
* fix roles list appearance
* fix auth widget in auth page
* update more dark logic
* update more dark logic
* add button default bg and border
* update pricing page theme styling
* clean up Themeimage
* remove forceDark in homepage
* update dark:border-dark occurrences
* update dark:border-dark occurrences
* fix dark mode base colors
* remove foreground-strong
* fix notification badge bg
* remove some dark: selectors
* update dark: selectors
* update code-hike deep dark bg color
* fix comment typo
* update border-button-hover token
* fix customer story logo
* remove some more dark: selectors
* restore forceDark in www homepage
* fix auth react icon
* fix homepage product visuals
* remove theme
* add brand-link token
* fix checkbox bg
* npm install
* more visible EntityListItem active bg
* fix --background-alternative-default css vars
---------
Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
* 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.