Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and centralizes the logic for generating and applying SEO meta tags for server detail pages. The main improvements include moving the
getServerDocumentMetafunction to a shared utility, updating the meta synchronization logic, and adding comprehensive tests for SEO meta behavior.SEO meta generation and application improvements:
getServerDocumentMetafunction fromserver-detail/index.tsxto the sharedseo-meta.tsutility, ensuring consistent meta tag generation across the app and reducing code duplication. ([[1]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-8030e4f1cfc9f15645bee27fea6e41bd59870f6cca847717a08f98a21891eb55L85-L106),[[2]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-6cf440cdf9d2642baf42deb78565c3ea085529b05446efe4382fa96481f06770R63-R81))getServerDocumentMetaand to apply meta tags dynamically on client-side navigation usinguseEffect. ([[1]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-8030e4f1cfc9f15645bee27fea6e41bd59870f6cca847717a08f98a21891eb55L1-R7),[[2]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-8030e4f1cfc9f15645bee27fea6e41bd59870f6cca847717a08f98a21891eb55L1-R7)51)syncLiveTitleflag to theRouteMetaHandleinterface and set it for the server detail route, allowing live updates of the document title and description without interference from the global meta sync logic. ([[1]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-6cf440cdf9d2642baf42deb78565c3ea085529b05446efe4382fa96481f06770R51),[[2]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-8030e4f1cfc9f15645bee27fea6e41bd59870f6cca847717a08f98a21891eb55L1-R7)24,[[3]](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-3a5f440e6650986a9891277279d4d6bbd6e25d360d4a966dee27510b0ce1dbc1L19-R21))Testing and reliability:
seo-meta.ts, verifying translation fallback behavior, language resolution, and correct meta generation for different server states (online, offline, not found). ([frontend/app/core/lib/seo-meta.test.tsR1-R92](https://github.com/Flash303/minecraft-stats/pull/107/files#diff-409a49d71ad452b934b87337c2c066b5db2703d0046d70e3e5214e14900cf193R1-R92))These changes improve maintainability, ensure correct SEO meta behavior, and make it easier to test and extend meta tag logic in the future.