-
Notifications
You must be signed in to change notification settings - Fork 3
Roam: Folder Restructure #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| import { OnloadArgs } from "roamjs-components/types"; | ||
| import MultiTextPanel from "roamjs-components/components/ConfigPanels/MultiTextPanel"; | ||
| import NumberPanel from "roamjs-components/components/ConfigPanels/NumberPanel"; | ||
| import FlagPanel from "roamjs-components/components/ConfigPanels/FlagPanel"; | ||
| import CustomPanel from "roamjs-components/components/ConfigPanels/CustomPanel"; | ||
| import SelectPanel from "roamjs-components/components/ConfigPanels/SelectPanel"; | ||
| import TextPanel from "roamjs-components/components/ConfigPanels/TextPanel"; | ||
| import DiscourseNodeConfigPanel from "~/components/settings/DiscourseNodeConfigPanel"; | ||
| import DiscourseRelationConfigPanel from "~/components/settings/DiscourseRelationConfigPanel"; | ||
| import DEFAULT_RELATION_VALUES from "~/data/defaultDiscourseRelations"; | ||
| import { | ||
| onPageRefObserverChange, | ||
| previewPageRefHandler, | ||
| overlayPageRefHandler, | ||
| } from "~/utils/pageRefObserverHandlers"; | ||
| import { ConfigTab } from "roamjs-components/components/ConfigPage"; | ||
| import { | ||
| Field, | ||
| CustomField, | ||
| SelectField, | ||
| FlagField, | ||
| } from "roamjs-components/components/ConfigPanels/types"; | ||
|
|
||
| export const configPageTabs = (args: OnloadArgs): ConfigTab[] => [ | ||
| { | ||
| id: "home", | ||
| fields: [ | ||
| { | ||
| title: "trigger", | ||
| description: | ||
| "The trigger to create the node menu. Must refresh after editing", | ||
| defaultValue: "\\", | ||
| // @ts-ignore | ||
| Panel: TextPanel, | ||
| }, | ||
| // @ts-ignore | ||
| { | ||
| title: "disable sidebar open", | ||
| description: "Disable opening new nodes in the sidebar when created", | ||
| Panel: FlagPanel, | ||
| } as Field<FlagField>, | ||
| // @ts-ignore | ||
| { | ||
| title: "preview", | ||
| description: | ||
| "Whether or not to display page previews when hovering over page refs", | ||
| Panel: FlagPanel, | ||
| options: { | ||
| onChange: onPageRefObserverChange(previewPageRefHandler), | ||
| }, | ||
| } as Field<FlagField>, | ||
| ], | ||
| }, | ||
| { | ||
| id: "grammar", | ||
| fields: [ | ||
| // @ts-ignore | ||
| { | ||
| title: "nodes", | ||
| Panel: CustomPanel, | ||
| description: "The types of nodes in your discourse graph", | ||
| options: { | ||
| component: DiscourseNodeConfigPanel, | ||
| }, | ||
| } as Field<CustomField>, | ||
| // @ts-ignore | ||
| { | ||
| title: "relations", | ||
| Panel: CustomPanel, | ||
| description: "The types of relations in your discourse graph", | ||
| defaultValue: DEFAULT_RELATION_VALUES, | ||
| options: { | ||
| component: DiscourseRelationConfigPanel, | ||
| }, | ||
| } as Field<CustomField>, | ||
| // @ts-ignore | ||
| { | ||
| title: "overlay", | ||
| Panel: FlagPanel, | ||
| // description: | ||
| // "Whether to overlay discourse context information over node references", | ||
| description: "Currently disabled. Being reworked.", | ||
| disabled: true, | ||
mdroidian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| options: { | ||
| onChange: (val) => { | ||
| onPageRefObserverChange((s) => overlayPageRefHandler(s, args))(val); | ||
| }, | ||
| }, | ||
| } as Field<FlagField>, | ||
| ], | ||
| }, | ||
| { | ||
| id: "export", | ||
| fields: [ | ||
| { | ||
| title: "max filename length", | ||
| // @ts-ignore | ||
| Panel: NumberPanel, | ||
| description: "Set the maximum name length for markdown file exports", | ||
| defaultValue: 64, | ||
| }, | ||
| { | ||
| title: "remove special characters", | ||
| // @ts-ignore | ||
| Panel: FlagPanel, | ||
| description: | ||
| "Whether or not to remove the special characters in a file name", | ||
| }, | ||
| { | ||
| title: "simplified filename", | ||
| // @ts-ignore | ||
| Panel: FlagPanel, | ||
| description: | ||
| "For discourse nodes, extract out the {content} from the page name to become the file name", | ||
| }, | ||
| { | ||
| title: "frontmatter", | ||
| // @ts-ignore | ||
| Panel: MultiTextPanel, | ||
| description: | ||
| "Specify all the lines that should go to the Frontmatter of the markdown file", | ||
| }, | ||
| { | ||
| title: "resolve block references", | ||
| // @ts-ignore | ||
| Panel: FlagPanel, | ||
| description: | ||
| "Replaces block references in the markdown content with the block's content", | ||
| }, | ||
| { | ||
| title: "resolve block embeds", | ||
| // @ts-ignore | ||
| Panel: FlagPanel, | ||
| description: | ||
| "Replaces block embeds in the markdown content with the block's content tree", | ||
| }, | ||
| // @ts-ignore | ||
| { | ||
| title: "link type", | ||
| Panel: SelectPanel, | ||
| description: "How to format links that appear in your export.", | ||
| options: { | ||
| items: ["alias", "wikilinks", "roam url"], | ||
| }, | ||
| } as Field<SelectField>, | ||
| { | ||
| title: "append referenced node", | ||
| // @ts-ignore | ||
| Panel: FlagPanel, | ||
| description: | ||
| "If a referenced node is defined in a node's format, it will be appended to the discourse context", | ||
| }, | ||
| ], | ||
| }, | ||
| ]; | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { NODE_CONFIG_PAGE_TITLE } from "~/settings/configPages"; | ||
| import { NODE_CONFIG_PAGE_TITLE } from "~/utils/renderNodeConfigPage"; | ||
|
|
||
| export const isDiscourseNodeConfigPage = (title: string) => | ||
| title.startsWith(NODE_CONFIG_PAGE_TITLE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.