Skip to content
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

Enhancement: Simple mode for a focus on managing front matter #240

Closed
johnfuller opened this issue Feb 1, 2022 · 10 comments
Closed

Enhancement: Simple mode for a focus on managing front matter #240

johnfuller opened this issue Feb 1, 2022 · 10 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@johnfuller
Copy link

This extension has promise for managing front matter even when you don't have a need for publishing files with a static site generator. One example use case is managing a large amount of markdown files generated by Obsidian. Maybe Obsidian would be a more appropriate environment to build these tools into, but this extension has a good start and may still have a better interface for this.

A simple mode could provide settings to remove items related to publishing, such as the server, preview URL's, SEO, etc. The dashboard could still be useful for summarizing as it does now. Maybe the publishing workflow wouldn't be needed, but that's easy enough to deal with given the settings already provided.

@estruyf
Copy link
Owner

estruyf commented Feb 2, 2022

Haven't used Obsidian, maybe I need to get myself familiar with it.

So if we have a setting where you can define which type of functionalities you want to enable or disable. It would make this kind of request possible. Thinking of a sort of feature flags. We can define what falls under local development, management, ... By default all is enabled, but if you remove local development from the list, all related UI elements will be hidden.

@estruyf estruyf added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Feb 2, 2022
@estruyf
Copy link
Owner

estruyf commented Feb 2, 2022

{
	"frontMatter.global.features": ["local-development", "management", ...]
}

@zivbk1
Copy link

zivbk1 commented Feb 6, 2022

Might be cool to have a toggle to enable 'Simple' mode that uses the "frontMatter.global.features" array for the UI and then when that is toggled to 'Default' you see all possible UI elements.

@estruyf
Copy link
Owner

estruyf commented Feb 7, 2022

Thanks @zivbk1, really like this idea of having a simple mode.

@estruyf
Copy link
Owner

estruyf commented Mar 31, 2022

Have been thinking about this enhancement again. What if you can define multiple modes?

To clarify, what I'm thinking of, is that you can define your own modes, this way, show/hide enable/disable from the UI. With another setting, you can define the default mode to load.

"frontMatter.global.activeMode": "",
"frontMatter.global.modes": [
  {
    "id": "minimal",
    "features": [
      "panel_actions",
      "..."
    ]
  }
]

@bwklein
Copy link

bwklein commented Mar 31, 2022

That would be great, then would there be a way to switch them from the UI?

@estruyf
Copy link
Owner

estruyf commented Mar 31, 2022

Of course, there is a command available for it, or via the following buttons

Screenshot 2022-03-31 at 15 52 30
Screenshot 2022-03-31 at 15 49 20

@bwklein
Copy link

bwklein commented Mar 31, 2022

Perfect

@estruyf
Copy link
Owner

estruyf commented Mar 31, 2022

The set of features to enable in your mode are the following:

  • panel.globalSettings
  • panel.seo
  • panel.actions
  • panel.metadata
  • panel.recentlyModified
  • panel.otherActions
  • dashboard.snippets.view
  • dashboard.snippets.manage
  • dashboard.data.view

@estruyf
Copy link
Owner

estruyf commented Mar 31, 2022

Example configuration:

"frontMatter.global.activeMode": "",
"frontMatter.global.modes": [
  {
    "id": "minimal",
    "features": [
      "panel.metadata",
      "panel.globalSettings",
      "panel.seo",
      "dashboard.data.view",
      "dashboard.snippets.view"
    ]
  }
]
  1. When frontMatter.global.activeMode is not set, it will show the default view.
  2. When you switch to another mode, minimal in this case. It will only be for the current session and will not update the settings. That way, you will not override the experience when you commit your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants