* Draft
* Update text for guide
* Update text for guide
* Update code for newer next js versions
* Final small change
* Update apps/docs/content/_partials/project_setup.mdx
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* Changes from review
* Use project name in tutorial text
* Fix up inclusion
* Fix inclusion
* Prettier
---------
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* General updates and switch to Svelte 5
* Update code example to Svelte 5
* Update some examples to use codesamples component
* Add Svelte to codesample component
* Final code updates
* Add more CodeSample components
Partials are currently defined via MDX includes. This PR switches to pre-compile-time partials, which have a new syntax:
```
<$Partial path="path/to/file.mdx" />
```
## Rationale
This produces two improvements:
1. Partial substitution can occur in pipelines that don't use MDX compilation. For example, we can now do partial substitution before building the search index, so partial content will also be indexed.
2. After the App Router migration, the MDXProviders should've been deprecated, but were kept around for the sole reason of making partials work, and leading to us shipping unnecessary client-side code. We get a minor decrease in overall client bundle size (5.74 MB to 5.6 MB) by getting rid of the Providers.
## Breaking changes
Besides the change to partial syntax, the arguments are also less powerful than before because we are doing string substitution and don't have the full power of JS. Defining string variables is still possible (documented in the Contributing guide), and since that's all we actually do in practice, this shouldn't be too cumbersome. There is always the escape hatch of making a custom component for more complex content reuse cases.
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>
It seems that `utils/supabase/server.js` is not a valid JS code.
Specifically it has non-null assertion operator. Remove the operator to
make the code valid.
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.
* Refactor login_page with a _showSnackBar function
* Add an onError block to onAuthStateChange
Errors get swallowed without this error handler, I noticed it when I had requested too many magic link emails, there was no feedback in the ui, nor in the logs in the console.
* Fix SnackBars not being displayed and add a _showSnackBar function
* Fix code samples for login_page.dart and account_page.dart to reflect fixes in #27104
* Fix isError not being passed for an Unexpected Error in login_page
* Update flutter user management example to a more modern code
* Update the guide to match the new content
* run formatter
* got rid of excess code and minor format fix
---------
Co-authored-by: dshukertjr <dshukertjr@gmail.com>