Repository navigation
Conversation
GitLab serves the page at the path home as the front page of a wiki, but GitLabWikiStrategy named the page of the main topic after its title, so a wiki generated with MainTopicId had no front page. MarkdownAddressingStrategy now identifies the main topic with the new protected IsMainTopic and resolves the main path through GetTopicPath, which GitLabWikiStrategy overrides to return home for the main topic. The topic identifiers are kept in fields, so the path resolvers take no parameters. Behavior changes: - GitLabWikiStrategy placed the main topic at its encoded title, such as Welcome, with the other pages under Welcome/. It now places the main topic at home, with the other pages under home/. - A top-level topic whose page name matched the name of the main page got the path of the main page and overwrote it. It is now nested under the main page like any other topic.
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.
Place the GitLab Wiki main topic at the home path
GitLab serves the page at the path
homeas the front page of a wiki.GitLabWikiStrategynamed the main topic's page after its title, so a wiki generated withMainTopicIdhad no front page.Changes
MarkdownAddressingStrategyhas a new protectedIsMainTopic(ITopic)that tells whether a topic is the main topic. Subclasses that override the path methods can use it to recognize the main topic.GetTopicPath.GitLabWikiStrategyoverridesGetTopicPathand returnshomefor the main topic.Behavior changes
Welcome, with the other pages underWelcome/. It is now placed athome, with the other pages underhome/.DevOpsWikiStrategy.DevOpsWikiStrategyaddresses are otherwise unchanged, and no public or protected member was removed or changed.Testing
MainTopicIdAndApiTopicId_PlaceMainTopicAtHomePathAndPagesUnderItreplaces the previous GitLab main-topic test. Its main topic is titled "Welcome", so the test shows the path no longer follows the title. It failed before the fix and passes now.MainTopicId_TopicNamedLikeHomePage_IsNestedUnderHomePagecovers the collision case. It fails if the old path comparison is restored.dotnet build -c Releasehas no warnings, anddotnet test --no-build -c Releasepasses all 3759 tests.