PR to start introducing Linter V2!
Primary improvements from this linter:
Better parsing of MDX (fewer false positives)
More flexibility
And suggested autofixes! (see auto-generated PR comment below for how that works)
Turning this on for only a small portion of the repo at first to avoid an avalanche of alerts, will slowly expand from there.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
When a troubleshooting entry is created or updated in this repo, sync it to GitHub. This creates a new troubleshooting discussion if one does not exist, and updates the content on an existing troubleshooting discussion if it has changed.
To preserve the connections between GitHub discussions and Markdown files, record the discussion ID and URL to the database. The database ID is then written to the Markdown file, and a new PR is generated to commit the new Markdown with ID.
There is currently no mechanism to delete outdated discussions. That will be a follow-up.
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.
Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).
Adjusted one of the example tutorials to use this new feature as a test.
Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.)
Some notes:
Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all.
Tried various tricks with caching and pre-generating data but no dice.
So I changed to only building one copy of each SDK+version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages.
For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots.
You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" <URL_OF_PAGE>
Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine.
With this approach, full production builds are really fast: ~5 minutes
Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.
We don't need this for migration pushes since the Supabase integration will do
it instead. Removing it makes this action less brittle since embedding updates
get blocked on CLI problems.
* Don't create a new image whenever a new tag is published on supabase/supabase.
* No need for an input when triggering a new build.
* Enable the latest tag for all pushes.
* 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.
Need a fetch-depth 0 in order to preserve commit dates within GitHub
Actions, otherwise a shallow fetch will use the current date as the
commit date, which renders this entire flow useless.
Keeps track of fine-grained (per section) edit times for docs content.
Once daily, a GitHub Action runs that:
- Checks whether content hashes have changed for each section
- Updates the table that tracks content edit times if the hashes have changed
Note: The cron job isn't scheduled yet. I'll run the Action manually a few times to validate it, then turn it on in another PR.
Introduces the first (very small) slice of the new command menu as a `ui-pattern`.
This slice just handles state for available commands. It isn't hooked up to anything yet.
* Try to fix the prettier github action.
* Revert "Try to fix the prettier github action."
This reverts commit 3a3fbe51e1.
* Fix the prettier dependency in package-lock.json.
* Run prettier format over the whole repo.
* Revert "Fix the prettier dependency in package-lock.json."
This reverts commit 8c6b241907.
* Revert the prettier format changes.
* Add a command for checking prettier. Use it in the github action. Use npm ci in the github action.
* Fix another accidental formatting.
* fix: correct mgmt api naming
* feat: new command to generate mgmt api sections
* feat: sort section items
* chore: tidy up
* fix: add generate sections to the default command
* feat: add gha to auto update mgmt api docs
* chore: tidy up
* fix: operationId logic to support self-hosting references
* chore: update latest mgmt api specs
* chore: update latest mgmt api specs
Add a prose linter that runs on docs content changes and a basic config. Linter only lints changed lines, and it will fail on error. For now, this is not a mandatory check because we expect a lot of false positives while we tweak the linter to suit our conventions.
* 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.