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

Multiple new settings, app components import, multiple format exports, static folder, ... #128

Merged
merged 12 commits into from
May 5, 2022

Conversation

fdoflorenzano
Copy link
Contributor

@fdoflorenzano fdoflorenzano commented May 4, 2022

This PR adds a bunch of options that enable more personalization apart from custom imports:

Added

  • Support to import custom SideBar React component that replaces sidebar in Mechanic UI. It's expected to be name-exported in in new app/ folder in mechanic project.
  • New design function export ExtraUi, expected to be a React component that's added to the bottom section of sidebar, on top of default toggles and buttons.
  • Support for SVG and PNG exports for SVG based engines like engine-react and engine-svg.
  • New hideFeedback design function setting. When true, Mechanic's feedback button is hidden. Defaults to false.
  • New hideNavigation design function setting. When true, the navigation input that let's users select a design function is hidden. Defaults to false.
  • New hidePresets design function setting. When true, preset selection input is hidden. Defaults to false.
  • New hideScaleToFit design function setting. When true, Scale to Fit toggle is hidden. Defaults to false.
  • New scaleToFit design function setting. When false, Scale to Fit will be off initially. Defaults to true.
  • New hideAutoRefresh design function setting. When true, Auto Refresh toggle is hidden. Defaults to false.
  • New autoRefresh design function setting. When false, Auto Refresh will be off initially. Defaults to true.
  • New hideGenerate design function setting. When true, Generate button is hidden. Defaults to false.
  • New showMultipleExports design function setting. When false, single export button is shown. When true, two separate export buttons are shown: one for PNG export and another for SVG export. Defaults to false.
  • New ignoreStyles design function setting. When true, CSS in iframe is injected into design function's SVG output. Defaults to false.
  • Support to serve static/ folder for all design functions. Allows to serve custom favicon.
  • _isPreview value is passed to design function handler in inputs argument. Allows design function to adjust if the render is a preview or an export.

@fdoflorenzano fdoflorenzano requested a review from bravomartin May 4, 2022 16:43
@fdoflorenzano fdoflorenzano self-assigned this May 4, 2022
@fdoflorenzano fdoflorenzano changed the title App component exports Multiple new settings, app components import, multiple format exports, static folder, ... May 4, 2022
@fdoflorenzano fdoflorenzano added mechanic About general mechanic functionalities enhancement New feature or request labels May 4, 2022
Copy link
Member

@bravomartin bravomartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! Just some minor comments, mostly formal. Take any that make sense to you.

Approved! 🥇

packages/core/CHANGELOG.md Outdated Show resolved Hide resolved
packages/core/CHANGELOG.md Show resolved Hide resolved
packages/core/CHANGELOG.md Outdated Show resolved Hide resolved
packages/core/CHANGELOG.md Outdated Show resolved Hide resolved
packages/core/CHANGELOG.md Show resolved Hide resolved
@fdoflorenzano fdoflorenzano merged commit 0e1219d into main May 5, 2022
@fdoflorenzano fdoflorenzano deleted the app-component-exports branch May 5, 2022 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mechanic About general mechanic functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants