diff --git a/gradle/changelog/readme-changes.yaml b/gradle/changelog/readme-changes.yaml new file mode 100644 index 0000000000..afceea76d8 --- /dev/null +++ b/gradle/changelog/readme-changes.yaml @@ -0,0 +1,6 @@ +- type: added + description: A new extension point was added, that is rendered below the file tree in the code view, it is for example used by the readme plugin, to render the readme document of the current directory +- type: changed + description: The headings of rendered markdown documents will now start at h2 +- type: changed + description: The order of items in the repository side menu got changed, code is now always at the top diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index 931db3c105..48a44fd083 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -6422,7 +6422,7 @@ exports[`Storyshots MarkdownView Header Anchor Links 1`] = ` className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changelog" > -

Changelog @@ -6439,7 +6439,7 @@ exports[`Storyshots MarkdownView Header Anchor Links 1`] = ` onKeyPress={[Function]} /> -

+ @@ -6474,7 +6474,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#compl_icated_hader" > -

Compl_icated_H€aDer @@ -6491,7 +6491,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -6499,7 +6499,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2160---2021-03-26" > -

-

+ @@ -6531,7 +6531,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added" > -

Added @@ -6548,7 +6548,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -6666,7 +6666,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed" > -

Fixed @@ -6683,7 +6683,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -6775,7 +6775,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed" > -

Changed @@ -6792,7 +6792,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -6845,7 +6845,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2151---2021-03-17" > -

-

+ @@ -6877,7 +6877,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-1" > -

Fixed @@ -6894,7 +6894,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7023,7 +7023,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2150---2021-03-12" > -

-

+ @@ -7055,7 +7055,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-1" > -

Added @@ -7072,7 +7072,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7151,7 +7151,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-2" > -

Fixed @@ -7168,7 +7168,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7221,7 +7221,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2141---2021-03-03" > -

-

+ @@ -7253,7 +7253,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-3" > -

Fixed @@ -7270,7 +7270,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7354,7 +7354,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2140---2021-03-01" > -

-

+ @@ -7386,7 +7386,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-2" > -

Added @@ -7403,7 +7403,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7521,7 +7521,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-4" > -

Fixed @@ -7538,7 +7538,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7643,7 +7643,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-1" > -

Changed @@ -7660,7 +7660,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7752,7 +7752,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2130---2021-01-29" > -

-

+ @@ -7784,7 +7784,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-3" > -

Added @@ -7801,7 +7801,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -7945,7 +7945,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-2" > -

Changed @@ -7962,7 +7962,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8072,7 +8072,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-5" > -

Fixed @@ -8089,7 +8089,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8142,7 +8142,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2120---2020-12-17" > -

-

+ @@ -8174,7 +8174,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-4" > -

Added @@ -8191,7 +8191,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8244,7 +8244,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-3" > -

Changed @@ -8261,7 +8261,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8288,7 +8288,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-6" > -

Fixed @@ -8305,7 +8305,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8392,7 +8392,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2111---2020-12-07" > -

-

+ @@ -8424,7 +8424,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-7" > -

Fixed @@ -8441,7 +8441,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8476,7 +8476,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2110---2020-12-04" > -

-

+ @@ -8508,7 +8508,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-5" > -

Added @@ -8525,7 +8525,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8651,7 +8651,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-4" > -

Changed @@ -8668,7 +8668,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8695,7 +8695,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-8" > -

Fixed @@ -8712,7 +8712,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8764,7 +8764,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2101---2020-11-24" > -

-

+ @@ -8796,7 +8796,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-9" > -

Fixed @@ -8813,7 +8813,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8853,7 +8853,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#2100---2020-11-20" > -

-

+ @@ -8885,7 +8885,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-6" > -

Added @@ -8902,7 +8902,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -8981,7 +8981,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-10" > -

Fixed @@ -8998,7 +8998,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9063,7 +9063,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#291---2020-11-11" > -

-

+ @@ -9095,7 +9095,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-11" > -

Fixed @@ -9112,7 +9112,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9131,7 +9131,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#290---2020-11-06" > -

-

+ @@ -9163,7 +9163,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-7" > -

Added @@ -9180,7 +9180,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9250,7 +9250,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-12" > -

Fixed @@ -9267,7 +9267,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9372,7 +9372,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#280---2020-10-27" > -

-

+ @@ -9404,7 +9404,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-8" > -

Added @@ -9421,7 +9421,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9474,7 +9474,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-5" > -

Changed @@ -9491,7 +9491,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9531,7 +9531,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-13" > -

Fixed @@ -9548,7 +9548,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9601,7 +9601,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#263---2020-10-16" > -

-

+ @@ -9633,7 +9633,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-14" > -

Fixed @@ -9650,7 +9650,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9677,7 +9677,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#271---2020-10-14" > -

-

+ @@ -9709,7 +9709,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-15" > -

Fixed @@ -9726,7 +9726,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9766,7 +9766,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-6" > -

Changed @@ -9783,7 +9783,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9810,7 +9810,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#270---2020-10-12" > -

-

+ @@ -9842,7 +9842,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-9" > -

Added @@ -9859,7 +9859,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9886,7 +9886,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#262---2020-10-09" > -

-

+ @@ -9918,7 +9918,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-10" > -

Added @@ -9935,7 +9935,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -9962,7 +9962,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-16" > -

Fixed @@ -9979,7 +9979,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10032,7 +10032,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#261---2020-09-30" > -

-

+ @@ -10064,7 +10064,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-17" > -

Fixed @@ -10081,7 +10081,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10108,7 +10108,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#260---2020-09-25" > -

-

+ @@ -10140,7 +10140,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-11" > -

Added @@ -10157,7 +10157,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10223,7 +10223,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-7" > -

Changed @@ -10240,7 +10240,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10267,7 +10267,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-18" > -

Fixed @@ -10284,7 +10284,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10415,7 +10415,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#250---2020-09-10" > -

-

+ @@ -10447,7 +10447,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-12" > -

Added @@ -10464,7 +10464,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10543,7 +10543,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-19" > -

Fixed @@ -10560,7 +10560,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10618,7 +10618,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#241---2020-09-01" > -

-

+ @@ -10650,7 +10650,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-13" > -

Added @@ -10667,7 +10667,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10694,7 +10694,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-20" > -

Fixed @@ -10711,7 +10711,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -10868,7 +10868,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#240---2020-08-14" > -

-

+ @@ -10900,7 +10900,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-14" > -

Added @@ -10917,7 +10917,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11022,7 +11022,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-21" > -

Fixed @@ -11039,7 +11039,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11105,7 +11105,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#231---2020-08-04" > -

-

+ @@ -11137,7 +11137,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-15" > -

Added @@ -11154,7 +11154,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11181,7 +11181,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-8" > -

Changed @@ -11198,7 +11198,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11225,7 +11225,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-22" > -

Fixed @@ -11242,7 +11242,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11282,7 +11282,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#230---2020-07-23" > -

-

+ @@ -11314,7 +11314,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-16" > -

Added @@ -11331,7 +11331,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11384,7 +11384,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-9" > -

Changed @@ -11401,7 +11401,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11446,7 +11446,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-23" > -

Fixed @@ -11463,7 +11463,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11568,7 +11568,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#220---2020-07-03" > -

-

+ @@ -11600,7 +11600,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-17" > -

Added @@ -11617,7 +11617,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11679,7 +11679,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-10" > -

Changed @@ -11696,7 +11696,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11757,7 +11757,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-24" > -

Fixed @@ -11774,7 +11774,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -11907,7 +11907,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#211---2020-06-23" > -

-

+ @@ -11939,7 +11939,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-25" > -

Fixed @@ -11956,7 +11956,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12017,7 +12017,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#210---2020-06-18" > -

-

+ @@ -12049,7 +12049,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-18" > -

Added @@ -12066,7 +12066,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12145,7 +12145,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-26" > -

Fixed @@ -12162,7 +12162,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12369,7 +12369,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200---2020-06-04" > -

-

+ @@ -12401,7 +12401,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-19" > -

Added @@ -12418,7 +12418,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12484,7 +12484,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-27" > -

Fixed @@ -12501,7 +12501,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12554,7 +12554,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc8---2020-05-08" > -

-

+ @@ -12586,7 +12586,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-20" > -

Added @@ -12603,7 +12603,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12673,7 +12673,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-11" > -

Changed @@ -12690,7 +12690,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12781,7 +12781,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-28" > -

Fixed @@ -12798,7 +12798,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12885,7 +12885,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc7---2020-04-09" > -

-

+ @@ -12917,7 +12917,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-21" > -

Added @@ -12934,7 +12934,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -12974,7 +12974,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-12" > -

Changed @@ -12991,7 +12991,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13031,7 +13031,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-29" > -

Fixed @@ -13048,7 +13048,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13088,7 +13088,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc6---2020-03-26" > -

-

+ @@ -13120,7 +13120,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-22" > -

Added @@ -13137,7 +13137,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13229,7 +13229,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-13" > -

Changed @@ -13246,7 +13246,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13288,7 +13288,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#removed" > -

Removed @@ -13305,7 +13305,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13337,7 +13337,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-30" > -

Fixed @@ -13354,7 +13354,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13423,7 +13423,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc5---2020-03-12" > -

-

+ @@ -13455,7 +13455,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-23" > -

Added @@ -13472,7 +13472,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13516,7 +13516,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-14" > -

Changed @@ -13533,7 +13533,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13567,7 +13567,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-31" > -

Fixed @@ -13584,7 +13584,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13618,7 +13618,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#removed-1" > -

Removed @@ -13635,7 +13635,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13659,7 +13659,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc4---2020-02-14" > -

-

+ @@ -13691,7 +13691,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-24" > -

Added @@ -13708,7 +13708,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13737,7 +13737,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-15" > -

Changed @@ -13754,7 +13754,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13817,7 +13817,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-32" > -

Fixed @@ -13834,7 +13834,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13859,7 +13859,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc3---2020-01-31" > -

-

+ @@ -13891,7 +13891,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-33" > -

Fixed @@ -13908,7 +13908,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -13932,7 +13932,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc2---2020-01-29" > -

-

+ @@ -13964,7 +13964,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-25" > -

Added @@ -13981,7 +13981,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -14025,7 +14025,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#changed-16" > -

Changed @@ -14042,7 +14042,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -14066,7 +14066,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#fixed-34" > -

Fixed @@ -14083,7 +14083,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ @@ -14132,7 +14132,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#200-rc1---2019-12-02" > -

-

+ @@ -14164,7 +14164,7 @@ and this project adheres to className="MarkdownHeadingRenderer__Link-sc-rj9qs1-0 bxffhl anchor" href="/#added-26" > -

Added @@ -14181,7 +14181,7 @@ and this project adheres to onKeyPress={[Function]} /> -

+ diff --git a/scm-ui/ui-components/src/index.ts b/scm-ui/ui-components/src/index.ts index 254e17b3be..00442e9d32 100644 --- a/scm-ui/ui-components/src/index.ts +++ b/scm-ui/ui-components/src/index.ts @@ -90,6 +90,7 @@ export * from "./devices"; export { default as copyToClipboard } from "./CopyToClipboard"; export { createA11yId } from "./createA11yId"; export { useSecondaryNavigation } from "./useSecondaryNavigation"; +export { default as useScrollToElement } from "./useScrollToElement"; export { default as comparators } from "./comparators"; diff --git a/scm-ui/ui-components/src/markdown/remarkToRehypeRendererAdapters.ts b/scm-ui/ui-components/src/markdown/remarkToRehypeRendererAdapters.ts index a7fef7c577..e8b97db297 100644 --- a/scm-ui/ui-components/src/markdown/remarkToRehypeRendererAdapters.ts +++ b/scm-ui/ui-components/src/markdown/remarkToRehypeRendererAdapters.ts @@ -58,7 +58,7 @@ export const createRemark2RehypeHeadingRendererAdapterFactory = (remarkRenderer: ({ node, children }: any) => { const renderProps = { id: node.properties.id, - level, + level: Math.min(level + 1, 6), permalink, }; children = children || []; diff --git a/scm-ui/ui-extensions/src/extensionPoints.tsx b/scm-ui/ui-extensions/src/extensionPoints.tsx index 7451376d76..857a25d7db 100644 --- a/scm-ui/ui-extensions/src/extensionPoints.tsx +++ b/scm-ui/ui-extensions/src/extensionPoints.tsx @@ -402,6 +402,11 @@ export type ReposSourcesContentActionBar = RenderableExtensionPointDefinition< } >; +export type RepositoryCodeOverviewContent = RenderableExtensionPointDefinition< + "repository.code.sources.content", + { sources: File; repository: Repository } +>; + export type RepositoryNavigation = RenderableExtensionPointDefinition< "repository.navigation", { repository: Repository; url: string; indexLinks: Links } diff --git a/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx b/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx index 211eeee163..febb5a7636 100644 --- a/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx +++ b/scm-ui/ui-webapp/src/repos/containers/RepositoryRoot.tsx @@ -34,7 +34,6 @@ import { FileControlFactory, HealthCheckFailureDetail, JumpToFileButton, - Loading, NavLink, Page, PrimaryContentColumn, @@ -44,6 +43,7 @@ import { SubNavigation, urls, } from "@scm-manager/ui-components"; +import { Loading } from "@scm-manager/ui-core"; import RepositoryDetails from "../components/RepositoryDetails"; import EditRepo from "./EditRepo"; import BranchesOverview from "../branches/containers/BranchesOverview"; @@ -349,6 +349,16 @@ const RepositoryRoot = () => { + name="repository.navigation.topLevel" props={extensionProps} @@ -380,16 +390,6 @@ const RepositoryRoot = () => { activeOnlyWhenExact={false} title={t("repositoryRoot.menu.tagsNavLink")} /> - name="repository.navigation" props={extensionProps} diff --git a/scm-ui/ui-webapp/src/repos/sources/containers/Sources.tsx b/scm-ui/ui-webapp/src/repos/sources/containers/Sources.tsx index 17f31bc62e..cf61585779 100644 --- a/scm-ui/ui-webapp/src/repos/sources/containers/Sources.tsx +++ b/scm-ui/ui-webapp/src/repos/sources/containers/Sources.tsx @@ -21,12 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React, { FC, useEffect } from "react"; +import React, { FC, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { useHistory, useLocation, useParams } from "react-router-dom"; import { RepositoryRevisionContextProvider, urls, useSources } from "@scm-manager/ui-api"; import { Branch, Repository } from "@scm-manager/ui-types"; -import { Breadcrumb, ErrorNotification, Loading, Notification } from "@scm-manager/ui-components"; +import { Breadcrumb } from "@scm-manager/ui-components"; +import { Notification, ErrorNotification, Loading } from "@scm-manager/ui-core"; import FileTree from "../components/FileTree"; import Content from "./Content"; import CodeActionBar from "../../codeSection/components/CodeActionBar"; @@ -35,6 +36,8 @@ import FileSearchButton from "../../codeSection/components/FileSearchButton"; import { isEmptyDirectory, isRootFile } from "../utils/files"; import CompareLink from "../../compare/CompareLink"; import { encodePart } from "../components/content/FileLink"; +import { ExtensionPoint, extensionPoints } from "@scm-manager/ui-extensions"; +import { useScrollToElement } from "@scm-manager/ui-components"; type Props = { repository: Repository; @@ -61,15 +64,22 @@ const Sources: FC = ({ repository, branches, selectedBranch, baseUrl }) = const history = useHistory(); const location = useLocation(); const [t] = useTranslation("repos"); + const [contentRef, setContentRef] = useState(); + + useScrollToElement(contentRef, () => location.hash, location.hash); + // redirect to default branch if no branch selected useEffect(() => { if (branches && branches.length > 0 && !selectedBranch) { const defaultBranch = branches?.filter((b) => b.defaultBranch === true)[0]; history.replace( - `${baseUrl}/sources/${defaultBranch ? encodePart(defaultBranch.name) : encodePart(branches[0].name)}/` + `${baseUrl}/sources/${defaultBranch ? encodePart(defaultBranch.name) : encodePart(branches[0].name)}/${ + location.hash + }` ); } - }, [branches, selectedBranch, history, baseUrl]); + }, [branches, selectedBranch, history, baseUrl, location.hash]); + const { isLoading, error, @@ -108,7 +118,7 @@ const Sources: FC = ({ repository, branches, selectedBranch, baseUrl }) = } else { return; } - history.push(url); + history.push(`${url}${location.hash}`); }; const evaluateSwitchViewLink = () => { @@ -202,20 +212,27 @@ const Sources: FC = ({ repository, branches, selectedBranch, baseUrl }) = return ( - {hasBranchesWhenSupporting(repository) && ( - - ) : null - } +
+ {hasBranchesWhenSupporting(repository) && ( + + ) : null + } + /> + )} + {renderPanelContent()} + + name="repository.code.sources.content" + props={{ sources: file, repository }} + renderAll={true} /> - )} - {renderPanelContent()} +
); };