wip: Work on editor docs
This commit is contained in:
parent
74d4f05d94
commit
3d01c0136c
61 changed files with 2429 additions and 2396 deletions
|
@ -61,12 +61,6 @@ export function menuCoreSettingsSaboolHandler({ toggleSa }) {
|
|||
return toggleSa
|
||||
}
|
||||
|
||||
const CoreDocsLink = ({ item }) => (
|
||||
<a href={`/docs/about/site/draft/#${item.toLowerCase()}`} className={`${linkClasses} tw:px-2`}>
|
||||
Learn more
|
||||
</a>
|
||||
)
|
||||
|
||||
export function menuCoreSettingsStructure({
|
||||
units = 'metric',
|
||||
sabool = false,
|
||||
|
@ -77,12 +71,7 @@ export function menuCoreSettingsStructure({
|
|||
sabool: {
|
||||
dense: true,
|
||||
title: 'Include seam allowance',
|
||||
about: (
|
||||
<>
|
||||
Controls whether or not you want to include seam allowance on your pattern.
|
||||
<CoreDocsLink item="sabool" />
|
||||
</>
|
||||
),
|
||||
about: <>Controls whether or not you want to include seam allowance on your pattern.</>,
|
||||
ux: config.uxLevels.core.sa,
|
||||
list: [0, 1],
|
||||
choiceTitles: {
|
||||
|
@ -99,12 +88,7 @@ export function menuCoreSettingsStructure({
|
|||
samm: sabool
|
||||
? {
|
||||
title: 'Seam Allowance Size',
|
||||
about: (
|
||||
<>
|
||||
Controls the size of the pattern's seam allowance.
|
||||
<CoreDocsLink item="sa" />
|
||||
</>
|
||||
),
|
||||
about: <>Controls the size of the pattern's seam allowance.</>,
|
||||
ux: config.uxLevels.core.sa,
|
||||
min: 0,
|
||||
max: units === 'imperial' ? 25.4 : 25, // values are in mm
|
||||
|
@ -115,12 +99,7 @@ export function menuCoreSettingsStructure({
|
|||
units: {
|
||||
dense: true,
|
||||
title: 'Pattern units',
|
||||
about: (
|
||||
<>
|
||||
Allows you to switch between metric and imperial units on the pattern.
|
||||
<CoreDocsLink item="units" />
|
||||
</>
|
||||
),
|
||||
about: <>Allows you to switch between metric and imperial units on the pattern.</>,
|
||||
ux: config.uxLevels.core.units,
|
||||
list: ['metric', 'imperial'],
|
||||
dflt: accountUnits,
|
||||
|
@ -141,7 +120,6 @@ export function menuCoreSettingsStructure({
|
|||
<>
|
||||
Trees are awesome, and taping together sewing patterns is not much fun. Try our paperless
|
||||
mode to avoid the need to print out your pattern altogether.
|
||||
<CoreDocsLink item="paperless" />
|
||||
</>
|
||||
),
|
||||
ux: config.uxLevels.core.paperless,
|
||||
|
@ -164,7 +142,6 @@ export function menuCoreSettingsStructure({
|
|||
<>
|
||||
Controls how detailed the pattern is; Either a complete pattern with all details, or a
|
||||
basic outline of the pattern parts.
|
||||
<CoreDocsLink item="complete" />
|
||||
</>
|
||||
),
|
||||
ux: config.uxLevels.core.complete,
|
||||
|
@ -187,7 +164,6 @@ export function menuCoreSettingsStructure({
|
|||
<>
|
||||
Controls efforts to save paper. Disable this to expand all pattern parts at the cost of
|
||||
using more space & paper.
|
||||
<CoreDocsLink item="expand" />
|
||||
</>
|
||||
),
|
||||
ux: config.uxLevels.core.expand,
|
||||
|
@ -206,12 +182,7 @@ export function menuCoreSettingsStructure({
|
|||
only: {
|
||||
dense: true,
|
||||
title: 'Only included selected pattern parts',
|
||||
about: (
|
||||
<>
|
||||
Allows you to control what parts to include in your pattern.
|
||||
<CoreDocsLink item="only" />
|
||||
</>
|
||||
),
|
||||
about: <>Allows you to control what parts to include in your pattern.</>,
|
||||
ux: config.uxLevels.core.only,
|
||||
dflt: false,
|
||||
list: parts,
|
||||
|
@ -224,7 +195,6 @@ export function menuCoreSettingsStructure({
|
|||
<>
|
||||
Allows you to control the scale of annotations on the pattern. This is most useful when
|
||||
generating very small patterns, like for doll outfits.
|
||||
<CoreDocsLink item="scale" />
|
||||
</>
|
||||
),
|
||||
ux: config.uxLevels.core.scale,
|
||||
|
@ -240,7 +210,6 @@ export function menuCoreSettingsStructure({
|
|||
<>
|
||||
Controls the gap between pattern parts, as well as the gap between the parts and the page
|
||||
edge.
|
||||
<CoreDocsLink item="margin" />
|
||||
</>
|
||||
),
|
||||
ux: config.uxLevels.core.margin,
|
||||
|
|
|
@ -4,17 +4,6 @@ import { designOptionType, set, orderBy } from '@freesewing/utils'
|
|||
import { i18n } from '@freesewing/collection'
|
||||
import { linkClasses } from '@freesewing/utils'
|
||||
|
||||
const DesignDocsLink = ({ design, item }) => (
|
||||
<a
|
||||
href={`/docs/designs/${design}/options/#${item.toLowerCase()}`}
|
||||
className={`${linkClasses} tw:px-2`}
|
||||
target="_BLANK"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Learn more
|
||||
</a>
|
||||
)
|
||||
|
||||
export function menuDesignOptionsStructure(design, options, settings, asFullList = false) {
|
||||
if (!options) return options
|
||||
const sorted = {}
|
||||
|
@ -24,12 +13,7 @@ export function menuDesignOptionsStructure(design, options, settings, asFullList
|
|||
...option,
|
||||
name,
|
||||
title: i18n[design]?.en?.o?.[name]?.t || name,
|
||||
about: (
|
||||
<span>
|
||||
{i18n[design]?.en?.o?.[name]?.d || name}
|
||||
<DesignDocsLink item={name} design={design} />
|
||||
</span>
|
||||
),
|
||||
about: <span>{i18n[design]?.en?.o?.[name]?.d || name}</span>,
|
||||
dense: true,
|
||||
sideBySide: true,
|
||||
}
|
||||
|
|
|
@ -3,12 +3,6 @@ import { defaultConfig } from '../config/index.mjs'
|
|||
import { linkClasses } from '@freesewing/utils'
|
||||
import { AsideIcon, RotateIcon, RocketIcon, UxIcon } from '@freesewing/react/components/Icon'
|
||||
|
||||
const UiDocsLink = ({ item }) => (
|
||||
<a href={`/docs/about/site/draft/#${item.toLowerCase()}`} className={`${linkClasses} tw:px-2`}>
|
||||
Learn more
|
||||
</a>
|
||||
)
|
||||
|
||||
export function menuUiPreferencesStructure() {
|
||||
const uiUx = defaultConfig.uxLevels.ui
|
||||
const uiPreferences = {
|
||||
|
@ -19,7 +13,6 @@ export function menuUiPreferencesStructure() {
|
|||
<span>
|
||||
Uses the right side of the screen for the Design Options, Core Settings, and UI
|
||||
Preferences menus.
|
||||
<UiDocsLink item="aside" />
|
||||
</span>
|
||||
),
|
||||
ux: uiUx.aside,
|
||||
|
@ -35,10 +28,7 @@ export function menuUiPreferencesStructure() {
|
|||
dense: true,
|
||||
title: 'User Experience',
|
||||
about: (
|
||||
<span>
|
||||
Controls the user experience, from keep it simple, to give me all the powers.
|
||||
<UiDocsLink item="control" />
|
||||
</span>
|
||||
<span>Controls the user experience, from keep it simple, to give me all the powers.</span>
|
||||
),
|
||||
ux: uiUx.ux,
|
||||
emoji: '🖥️',
|
||||
|
@ -63,12 +53,7 @@ export function menuUiPreferencesStructure() {
|
|||
rotate: {
|
||||
dense: true,
|
||||
title: 'Rotate Pattern',
|
||||
about: (
|
||||
<span>
|
||||
Allows you to rotate your pattern 90 degrees, handy for tall patterns.
|
||||
<UiDocsLink item="rotate" />
|
||||
</span>
|
||||
),
|
||||
about: <span>Allows you to rotate your pattern 90 degrees, handy for tall patterns.</span>,
|
||||
ux: uiUx.rotate,
|
||||
list: [0, 1],
|
||||
choiceTitles: {
|
||||
|
@ -81,12 +66,7 @@ export function menuUiPreferencesStructure() {
|
|||
renderer: {
|
||||
dense: true,
|
||||
title: 'Pattern render engine',
|
||||
about: (
|
||||
<span>
|
||||
Change the underlying method for rendering the pattern on screen.
|
||||
<UiDocsLink item="renderer" />
|
||||
</span>
|
||||
),
|
||||
about: <span>Change the underlying method for rendering the pattern on screen.</span>,
|
||||
ux: uiUx.renderer,
|
||||
list: ['react', 'svg'],
|
||||
choiceTitles: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue