File tree Expand file tree Collapse file tree 5 files changed +46
-11
lines changed
dokka-aws/src/main/kotlin/aws/sdk/kotlin/dokka Expand file tree Collapse file tree 5 files changed +46
-11
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "id" : " ef256fac-bada-4c42-8632-577faeac6800" ,
3+ "type" : " misc" ,
4+ "description" : " Disable search and address accessibility violations in documentation"
5+ }
Original file line number Diff line number Diff line change 1818 outline-offset : 2px ; /* Space between the outline and the button */
1919}
2020
21- # pages-search {
22- margin : 0 ;
23- padding-top : 10px ;
24- }
25-
2621# pages-search : focus {
2722 outline : revert;
2823}
2924
30- # pages-search-label {
31- display : none;
32- }
33-
3425/* copied from Dokka except for background-color attribute */
3526.navigation {
3627 display : flex;
4839
4940 z-index : 4 ;
5041}
42+
43+ /* Styles for section tabs like "Types" and "Functions" */
44+ .section-tab : focus , .section-tab : active {
45+ outline : 2px solid var (--active-tab-border-color ); /* The color appears unresolved, but it is defined in Dokka style sheets */
46+ }
47+
48+ /*
49+ Dokka does not break links or code blocks properly by default. Add word-wrap to prevent left/right scrollbar from
50+ appearing on small screens.
51+ */
52+ .main-content a : not ([data-name ]) {
53+ word-wrap : break-word;
54+ }
55+ .symbol {
56+ overflow-wrap : break-word;
57+ }
Original file line number Diff line number Diff line change 2323 </div >
2424 <div class =" navigation-controls" >
2525 <button class =" navigation-controls--btn navigation-controls--theme" id =" theme-toggle-button" type =" button" >switch theme</button >
26- <label for =" pages-search" id =" pages-search-label" >Search</label >
27- <div class =" navigation-controls--btn navigation-controls--search" id =" searchBar" role =" button" >search in API</div >
2826 </div >
2927 </nav >
3028</#macro >
Original file line number Diff line number Diff line change 66package aws.sdk.kotlin.dokka
77
88import aws.sdk.kotlin.dokka.transformers.FilterInternalApis
9+ import aws.sdk.kotlin.dokka.transformers.NoOpSearchbarDataInstaller
910import org.jetbrains.dokka.base.DokkaBase
1011import org.jetbrains.dokka.plugability.DokkaPlugin
1112import org.jetbrains.dokka.plugability.DokkaPluginApiPreview
@@ -25,6 +26,12 @@ class AwsDokkaPlugin : DokkaPlugin() {
2526 dokkaBase.preMergeDocumentableTransformer providing ::FilterInternalApis
2627 }
2728
29+ // FIXME Re-enable search once Dokka addresses performance issues
30+ // https://github.com/Kotlin/dokka/issues/2741
31+ val disableSearch by extending {
32+ dokkaBase.htmlPreprocessors providing ::NoOpSearchbarDataInstaller override dokkaBase.baseSearchbarDataInstaller
33+ }
34+
2835 @DokkaPluginApiPreview
2936 override fun pluginApiPreviewAcknowledgement () = PluginApiPreviewAcknowledgement
3037}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+
6+ package aws.sdk.kotlin.dokka.transformers
7+
8+ import org.jetbrains.dokka.base.renderers.html.SearchRecord
9+ import org.jetbrains.dokka.base.renderers.html.SearchbarDataInstaller
10+ import org.jetbrains.dokka.pages.DriResolver
11+ import org.jetbrains.dokka.plugability.DokkaContext
12+
13+ /* *
14+ * Disable the search bar data (pages.json).
15+ */
16+ class NoOpSearchbarDataInstaller (context : DokkaContext ) : SearchbarDataInstaller(context) {
17+ override fun generatePagesList (pages : List <SignatureWithId >, locationResolver : DriResolver ): List <SearchRecord > = listOf ()
18+ }
You can’t perform that action at this time.
0 commit comments