Skip to content

Commit fb8a334

Browse files
committed
Merge remote-tracking branch 'upstream/main' into r122909785/navigator-title-slot
2 parents 1185f6c + 6d2a842 commit fb8a334

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+894
-314
lines changed

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
:class="{ fromkeyboard: fromKeyboard, hascustomheader: hasCustomHeader }"
1515
>
1616
<div :id="AppTopID" />
17-
<a href="#main" id="skip-nav" v-if="!isTargetIDE">{{ $t('accessibility.skip-navigation') }}</a>
17+
<a href="#app-main" id="skip-nav" v-if="!isTargetIDE">
18+
{{ $t('accessibility.skip-navigation') }}
19+
</a>
1820
<slot name="header" :isTargetIDE="isTargetIDE">
1921
<SuggestLang v-if="enablei18n" />
2022
<!-- Render the custom header by default, if there is no content in the `header` slot -->

src/components/Article.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:rootReference="hierarchy.reference"
1919
:identifierUrl="identifierUrl"
2020
/>
21-
<main id="main" tabindex="0">
21+
<main id="app-main" tabindex="0">
2222
<slot name="above-hero" />
2323
<component
2424
v-for="(section, index) in sections"

src/components/Card.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,9 @@ export default {
180180
border-radius: $big-border-radius;
181181
182182
&:hover {
183-
box-shadow: 0 5px 10px var(--color-card-shadow);
184183
transform: scale(1.007);
185184
186185
@media (prefers-reduced-motion: reduce) {
187-
box-shadow: none;
188186
transform: none;
189187
}
190188
}

src/components/ContentNode.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,13 +673,21 @@ export default {
673673
// without any inline formatting—other block kinds like asides will be
674674
// ignored in the resulting plaintext representation.
675675
plaintext() {
676+
const { references = {} } = this;
676677
return this.reduce((text, node) => {
677678
if (node.type === BlockType.paragraph) {
678679
return `${text}\n`;
679680
}
681+
if (node.type === InlineType.codeVoice) {
682+
return `${text}${node.code}`;
683+
}
680684
if (node.type === InlineType.text) {
681685
return `${text}${node.text}`;
682686
}
687+
if (node.type === InlineType.reference) {
688+
const title = references[node.identifier]?.title ?? '';
689+
return `${text}${title}`;
690+
}
683691
return text;
684692
}, '').trim();
685693
},

src/components/ContentNode/Reference.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export default {
5454
name: 'Reference',
5555
computed: {
5656
isInternal({ url }) {
57+
if (!url) {
58+
return false;
59+
}
5760
if (!url.startsWith('/') && !url.startsWith('#')) {
5861
// If the URL has a scheme, it's not an internal link.
5962
return false;
@@ -92,7 +95,7 @@ export default {
9295
props: {
9396
url: {
9497
type: String,
95-
required: true,
98+
required: false,
9699
},
97100
kind: {
98101
type: String,

src/components/ContentNode/ReferenceExternal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-->
1010

1111
<template>
12-
<a v-if="isActive" :href="url"><slot /></a>
12+
<a v-if="url && isActive" :href="url"><slot /></a>
1313
<span v-else><slot /></span>
1414
</template>
1515

@@ -19,7 +19,7 @@ export default {
1919
props: {
2020
url: {
2121
type: String,
22-
required: true,
22+
required: false,
2323
},
2424
isActive: {
2525
type: Boolean,

src/components/ContentNode/ReferenceInternal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-->
1010

1111
<template>
12-
<router-link v-if="isActive" :to="url"><slot /></router-link>
12+
<router-link v-if="url && isActive" :to="url"><slot /></router-link>
1313
<span v-else><slot/></span>
1414
</template>
1515

@@ -19,7 +19,7 @@ export default {
1919
props: {
2020
url: {
2121
type: String,
22-
required: true,
22+
required: false,
2323
},
2424
isActive: {
2525
type: Boolean,

src/components/DocumentationLayout.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
:displaySidenav="enableNavigator"
2020
@toggle-sidenav="handleToggleSidenav"
2121
>
22-
<template #title>
23-
<slot name="nav-title" />
22+
<template #title="{ className }">
23+
<slot name="nav-title" :className="className" />
2424
</template>
2525
</Nav>
2626
<AdjustableSidebarWidth
@@ -62,8 +62,8 @@
6262
<template v-if="enableQuickNavigation" #filter>
6363
<QuickNavigationButton @click.native="openQuickNavigationModal" />
6464
</template>
65-
<template #navigator-head>
66-
<slot name="nav-title" />
65+
<template #navigator-head="{ className }">
66+
<slot name="nav-title" :className="className" />
6767
</template>
6868
</Navigator>
6969
</transition>

src/components/DocumentationTopic.vue

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
>
1616
<component
1717
:is="isTargetIDE ? 'div' : 'main'"
18-
class="main" id="main"
18+
class="main" id="app-main"
1919
>
2020
<DocumentationHero
2121
:role="role"
@@ -129,7 +129,6 @@
129129
:source="remoteSource"
130130
:sections="primaryContentSectionsSanitized"
131131
/>
132-
<ViewMore v-if="shouldShowViewMoreLink" :url="viewMoreLink" />
133132
</div>
134133
<Topics
135134
v-if="shouldRenderTopicSection"
@@ -145,15 +144,21 @@
145144
:isSymbolBeta="isSymbolBeta"
146145
/>
147146
<Relationships
148-
v-if="relationshipsSections && !enableMinimized"
147+
v-if="relationshipsSections"
149148
:sections="relationshipsSections"
149+
:enableMinimized="enableMinimized"
150150
/>
151151
<!-- NOTE: see also may contain information about other apis, so we cannot
152152
pass deprecation and beta information -->
153153
<SeeAlso
154154
v-if="seeAlsoSections && !enableMinimized"
155155
:sections="seeAlsoSections"
156156
/>
157+
<ViewMore
158+
v-if="shouldShowViewMoreLink"
159+
:url="viewMoreLink"
160+
class="minimized-container"
161+
/>
157162
</div>
158163
<template v-if="enableOnThisPageNav">
159164
<OnThisPageStickyContainer v-show="isOnThisPageNavVisible">
@@ -778,7 +783,7 @@ $space-size: 15px;
778783
}
779784
}
780785
781-
#main {
786+
#app-main {
782787
outline-style: none;
783788
height: 100%;
784789
@@ -831,6 +836,11 @@ $space-size: 15px;
831836
--aside-border-radius: 6px;
832837
--code-border-radius: 6px;
833838
839+
&:not(.declarations-container) {
840+
padding-left: 1.4rem;
841+
padding-right: 1.4rem;
842+
}
843+
834844
.description {
835845
margin-bottom: 1.5em;
836846
}
@@ -904,11 +914,6 @@ $space-size: 15px;
904914
}
905915
}
906916
907-
.full-width-container .doc-content .minimized-container {
908-
padding-left: 1.4rem;
909-
padding-right: 1.4rem;
910-
}
911-
912917
:deep() {
913918
.no-primary-content {
914919
// remove border-top for first section of the page
@@ -952,7 +957,7 @@ $space-size: 15px;
952957
min-width: 0;
953958
width: 100%;
954959
955-
// only render border on declaration list menu
960+
// only render border and bottom margin on declaration list menu
956961
// when there are no content sections afterwards at all
957962
.container:only-child {
958963
.declaration-list-menu:last-child::before {
@@ -961,6 +966,7 @@ $space-size: 15px;
961966
border-top-width: var(--content-table-title-border-width, 1px);
962967
content: '';
963968
display: block;
969+
margin-bottom: $section-spacing-single-side;
964970
}
965971
}
966972

0 commit comments

Comments
 (0)