Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start of dashboard i18n logic & implement on new Auth pages #372

Merged
merged 42 commits into from
Nov 20, 2024

Conversation

Adammatthiesen
Copy link
Member

Closes #325

This pull request includes several important changes to the studiocms_auth package, focusing on adding internationalization support, enhancing the authentication flow, and improving the routing and layout components.

Internationalization Enhancements:

  • Added language detection and translation usage in OAuthButtonStack.astro, StaticAuthCheck.astro, login.astro, logout.astro, and signup.astro components. [1] [2] [3] [4] [5]

Authentication Flow Improvements:

  • Introduced StaticAuthCheck.astro component to handle user authentication status and redirect accordingly.
  • Updated login.astro and signup.astro to include translated text and user authentication checks. [1] [2]

Routing and Layout Adjustments:

  • Modified integration.ts to add new routes for logout and improved server-side rendering options. [1] [2]
  • Adjusted AuthLayout.astro to support disabling the screen and handling language settings. [1] [2]

Core Utilities and Helpers:

  • Updated routeBuilder.ts to include locale in the dashboard route and enable prerendering for auth page routes. [1] [2]
  • Enhanced routemap.ts to include the logout API route.

UI Components:

  • Added LanguageSelector.astro component to allow users to switch languages within the application.

Copy link

changeset-bot bot commented Nov 13, 2024

🦋 Changeset detected

Latest commit: b854ea7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@studiocms/core Patch
studiocms Patch
@studiocms/auth Patch
@studiocms/ui Patch
@studiocms/blog Patch
@studiocms/dashboard Patch
@studiocms/devapps Patch
@studiocms/frontend Patch
@studiocms/imagehandler Patch
@studiocms/renderers Patch
@studiocms/assets Patch
@studiocms/betaresources Patch
@studiocms/robotstxt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@studiocms-no-reply
Copy link
Member

Thank you for submitting your Pull Request, the following links will become available for preview shortly:

1 similar comment
@studiocms-no-reply
Copy link
Member

Thank you for submitting your Pull Request, the following links will become available for preview shortly:

@Adammatthiesen Adammatthiesen linked an issue Nov 13, 2024 that may be closed by this pull request
Copy link

studio-cms-deployments bot commented Nov 14, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-11-17 21:32:26 CET

StudioCMS (bot) and others added 11 commits November 14, 2024 16:41
* Translated using Weblate (German)

Currently translated at 58.0% (18 of 31 strings)

Translated using Weblate (German)

Currently translated at 12.9% (4 of 31 strings)

Co-authored-by: Louis Escher <[email protected]>
Translate-URL: https://i18n.studiocms.xyz/projects/studiocms/core-i18n/de/
Translation: StudioCMS/Core i18n

* [ci] changesets

* [ci] changesets

* Delete .changeset/dry-zoos-behave.md

bug

---------

Co-authored-by: Louis Escher <[email protected]>
Co-authored-by: Adam Matthiesen <[email protected]>
Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple suggestions

TheOtterlord and others added 23 commits November 17, 2024 16:57
* Create draft PR for #351
[skip ci]

* version and prep docs

* Style adjustments to docs

* Revert text change

* update og images to conform to twitter guidelines

* update lockfile

* fix lint errors

* refactor docs to cleanup the whole thing

* remove now unneeded package

* update typedoc config

* dep cleanup

* Refactor Integration.astro to display "N/A" for unreleased packages

* update pageTitle to support integrations

* add sponsors section

* up

* Refactor Sponsors.astro to add target and rel attributes to sponsor link

* Update sidebar label

* Refactor Integration.astro to add support for plugins

* add note to styles

* update label

* Refactor Astro config to add support for @studiocms/blog plugin

* fix

* Refactor Astro config to remove isScoped and scope properties

* Refactor Astro config to remove unused code and improve package name parsing

* Refactor Sponsors component styles to center align links and headings

* fix icon

* Refactor packagecatalog config to remove extra code and improve package name parsing

* fix config reference

* Refactor PackageCatalog component to filter and sort packages based on pkgType prop

* Refactor PackageCatalog component to use 'catalog' prop instead of 'pkgType'

* Refactor Astro.props in Integration.astro to include publiclyUsable prop

* Refactor config.ts to include redirectSchema

* refactor

* Refactor Astro.config.mts to include @shikijs/twoslash integration

* Refactor Astro.config.mts to use StudioCMSOptions instead of StudioCMSOptionsSchema._input

* Dashboard additions removals (#354)

* Purge mentions of Astro Studio

* Add UI docs (getting started & button)

* Update packages/studiocms/src/index.ts

Co-authored-by: Adam Matthiesen <[email protected]>

* Fix border rounding

* Shrink hero

* Update www/docs/astro.config.mts

Co-authored-by: Adam Matthiesen <[email protected]>

* Finish button docs, fix merge conflicts

* Add more UI lib docs, adjust UI package

- Fixed a typo that caused a typedoc warning.
-Fixed a CSS leak in the UI library.
- Adjusted the DropdownHelper API (added an individual show toggle and renamed some functions)
- Looooooooooots more docs stuff

* Update button.mdx

* Adjust wording

* Update dropdown.mdx

* Add more UI docs, fix UI lib css

* Adjust sponsors css, add more UI lib docs

* Improve code snippets

* Document textarea, toggle, and user

* Changes to UI lib, new UI lib docs

* Fix missing comma

* Update custom.css

* mention include styles

* Adjustments for twoslash

* Update custom.css

* Twoslash more like twobitch

* Funny markdown support :)

* Made twoslash appear correctly

* Add changesets

* Add explicitTrigger for twoslash

---------

Co-authored-by: Reuben Tier <[email protected]>
Co-authored-by: Adam Matthiesen <[email protected]>

* start of adding transformers and their css

* more twoslash!

* Update '@astrojs/starlight' version to 0.28.3

* Update dependencies for '@astrojs/starlight', '@astrojs/db', '@astrojs/node', '@astrojs/react', and '@astrojs/web-vitals'

* test

* apply fix

* update docs and re-enable astro check

* Update configuration.mdx with link to reference pages

* Add description for StudioCMS DevApps

* Refactor StudioCMS package.json exports

* more progress

* Update Astro version to 4.16.3 and adjust button position in custom.css

* update default bracketPairs comment

* update to conform to new astro docs and update other links

* add ts-nocheck to prevent warnings/errors for shiki transformer

* revert

* new title transformer for shiki

* add titles

* cleanup

* update demo link in code snippet

* Update custom.css styles for code snippets

* Update studiocms/src/index.ts and www/docs/src/content/docs/config-reference/options-schema.mdx

* Refactor import statement in defineStudioCMSConfig.ts

* fix the TS error that was being caused by a `.` instead of a `,`

* some css styling for the copy button

* update css

* Update custom.css with new color tokens and styling for highlighted words and diffs

* remove spacing

* Update custom.css to add background color for highlighted words and diffs

* Update custom.css to adjust background colors for highlighted words and diffs

* fixed css

* Update custom.css to remove inline-block display for diff spans

* Remove test comment, fix copy SVGs, color changes

* Add image zoom, remove carousel, adjust hero buttons

* refactor css file into multiple files

* Refactor shiki transformers and update import paths

* Refactor Docs landing page

* Refactor SplitCard component CSS

* Refactor Youtube.astro component CSS

* Refactor why-studioCMS.mdx file

* Refactor card CSS to include all the cards from starlight

* Refactor index.mdx to include instructions for setting up Turso database

* Refactor Getting started guide and remove unused components

* Refactor getting started guide

* Refactor config references

* Refactor config references and add Renderer type

* Refactor StudioCMS custom renderer documentation to include information about defining custom renderers and their usage.

* cleanup docs

* Refactor environment variable documentation and add ReadMore component

* Refactor YouTube and landing card components

* Refactor Discord button styling in index.mdx and starlight.css

* Refactor starlight.css: Add gap to LinkButton button styling

* fix

* Refactor SplitCard component: Add padding to split container

* Refactor SplitCard component: Remove unnecessary padding in split container

* Refactor landing page: Update StudioCMS card icon

* Custom head component to preload the fonts

* Add new component for planned Contributor guide page

* Update sidebar component name, and update SiteTitle component

* Update astro.config.mts: Add 'x.com' link to StudioCMS social media

* Contributing guide!

* Update astro.config.mts: Add remotePatterns for images
Add new Contributing guide

* Update FacePile component: Adjust avatar size and alignment

* Update contributing guide

* Update contributing guide: Add link to contributing guide in README.md

* Update astro.config.mts: Add badge to @studiocms/ui label

* Update contributing guide: Update link to contributors list in contributing.mdx

* Update dependencies: Add hast-util-to-string, html-escaper, rehype-slug, rehype-autolink-headings, rehype-external-links, and @types/html-escaper

* Update anchor link icon style

* Update anchor link icon style and display of content elements

* Update dependencies: Add shiki-transformer-color-highlight and unified

* Update contributor list component and styles

* Refactor getContributorsByPath function to remove ignored commit keywords and improve author handling

* cleanup

* Update external link icon and remove underline from anchor links

* Update SiteTitle.astro

* Add bun as a package manager option

* Refactor getContributorsByPath function to improve author handling and remove ignored commit keywords

* Refactor TursoCLI command builder for improved handling of authentication and database commands

* Refactor to use dynamic sponsor links

* Update strings.ts

* Update why-studioCMS.mdx

* Feat(devapps): Wordpress Importer (#360)

* initial progress

* okay well it works!

* Add Wordpress importer app

* Add WordPress Importer app and update README.md

* update readme

* update docs

* Add Toolbar app image and update README.md

* remove unnecessary footnote

* Refactor wp-api converters and utils

This commit refactors the wp-api converters and utils in the studiocms_devapps package. It introduces the following changes:
- Added async/await functionality to ConvertToPageData and ConvertToPostData functions.
- Implemented fetching and downloading of title images for pages and posts.
- Updated the apiEndpoint function to include the 'media' type.

These changes improve the efficiency and functionality of the wp-api converters and utils.

* Refactor wp-api converters and utils, and add closeOnOutsideClick function

* Refactor createWindowElement function and add closeOnOutsideClick function

* Refactor TypeDoc configuration to include additional files

* Refactor devApps configuration to include WP API Importer

* typo

* Refactor wp-api converters and utils, and fix success check in wp-importer

* Refactor to remove warning as per @dreyfus92

* Update www/docs/src/content/docs/start-here/why-studioCMS.mdx

Co-authored-by: Adam Matthiesen <[email protected]>

* Update www/docs/src/content/docs/start-here/why-studioCMS.mdx

Co-authored-by: Adam Matthiesen <[email protected]>

* Update www/docs/src/content/docs/start-here/why-studioCMS.mdx

Co-authored-by: Adam Matthiesen <[email protected]>

* Update www/docs/src/content/docs/start-here/why-studioCMS.mdx

Co-authored-by: Adam Matthiesen <[email protected]>

* Update title in how-it-works/index.mdx

* Fix twoslash popups overflowing parent container

* Add theme helper, theme toggle component, docs

* Remove unused function call

* Update index.ts

* Fix a typo in the JSDoc

* Update theme-helper.mdx

Added an example for how to store the theme

* Update theme-helper.mdx

---------

Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com>
Co-authored-by: Adam Matthiesen <[email protected]>
Co-authored-by: Reuben Tier <[email protected]>
* start - playground node

* add sentry client config

* add to ui-testing playground

* add sentry release notification to release and snapshot actions

* Add conditional step to create Sentry release
* Translated using Weblate (German)

Currently translated at 58.0% (18 of 31 strings)

Translated using Weblate (German)

Currently translated at 12.9% (4 of 31 strings)

Co-authored-by: Louis Escher <[email protected]>
Translate-URL: https://i18n.studiocms.xyz/projects/studiocms/core-i18n/de/
Translation: StudioCMS/Core i18n

* [ci] changesets

* [ci] changesets

* Delete .changeset/dry-zoos-behave.md

bug

---------

Co-authored-by: Louis Escher <[email protected]>
Co-authored-by: Adam Matthiesen <[email protected]>
@Adammatthiesen Adammatthiesen merged commit 5692ef3 into issue-0304 Nov 20, 2024
2 checks passed
@Adammatthiesen Adammatthiesen deleted the dashboard-i18n branch November 20, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Dashboard i18n logic
5 participants