forked from MapComplete/MapComplete
Docs: improve documentation with quick overview table of the most important questions
This commit is contained in:
parent
4078b33a87
commit
aa5c309887
6 changed files with 78 additions and 20 deletions
|
|
@ -62,7 +62,7 @@ export class ExpandTagRendering extends Conversion<
|
|||
spec: string | { builtin: string | string[] } | TagRenderingConfigJson,
|
||||
ctx: ConversionContext
|
||||
): QuestionableTagRenderingConfigJson[] {
|
||||
const trs = this.convertOnce(<any>spec, ctx)?.map((tr) =>
|
||||
const trs = this.convertOnce(spec, ctx)?.map((tr) =>
|
||||
this.pruneMappings<TagRenderingConfigJson & { id: string }>(tr, ctx)
|
||||
)
|
||||
if (!Array.isArray(trs)) {
|
||||
|
|
@ -231,6 +231,8 @@ export class ExpandTagRendering extends Conversion<
|
|||
}
|
||||
}
|
||||
|
||||
found._definedIn = [layer.id, found.id]
|
||||
|
||||
found = contextWriter.convertStrict(
|
||||
found,
|
||||
ConversionContext.construct(
|
||||
|
|
@ -248,9 +250,9 @@ export class ExpandTagRendering extends Conversion<
|
|||
}
|
||||
|
||||
private convertOnce(
|
||||
tr: string | { builtin: string } | TagRenderingConfigJson,
|
||||
tr: string | { builtin: string | string[] } | TagRenderingConfigJson,
|
||||
ctx: ConversionContext
|
||||
): TagRenderingConfigJson[] {
|
||||
): (TagRenderingConfigJson & { id: string })[] {
|
||||
const state = this._state
|
||||
|
||||
if (tr === undefined) {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,6 @@
|
|||
import {
|
||||
Concat,
|
||||
DesugaringContext,
|
||||
DesugaringStep,
|
||||
Each,
|
||||
FirstOf,
|
||||
Fuse,
|
||||
On,
|
||||
SetDefault,
|
||||
} from "./Conversion"
|
||||
import { Concat, DesugaringContext, DesugaringStep, Each, FirstOf, Fuse, On, SetDefault } from "./Conversion"
|
||||
import { LayerConfigJson } from "../Json/LayerConfigJson"
|
||||
import {
|
||||
MinimalTagRenderingConfigJson,
|
||||
TagRenderingConfigJson,
|
||||
} from "../Json/TagRenderingConfigJson"
|
||||
import { MinimalTagRenderingConfigJson, TagRenderingConfigJson } from "../Json/TagRenderingConfigJson"
|
||||
import { Utils } from "../../../Utils"
|
||||
import RewritableConfigJson from "../Json/RewritableConfigJson"
|
||||
import SpecialVisualizations from "../../../UI/SpecialVisualizations"
|
||||
|
|
@ -265,6 +253,7 @@ export class AddQuestionBox extends DesugaringStep<LayerConfigJson> {
|
|||
seen.add("hidden")
|
||||
const question: QuestionableTagRenderingConfigJson = {
|
||||
id: "leftover-questions",
|
||||
labels: ["ignore-docs", "added_by_default"],
|
||||
render: {
|
||||
"*": `{questions( ,${Array.from(seen).join(";")})}`,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue