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

[FEATURE] Show hide components #78

Merged
merged 7 commits into from
Jul 5, 2021
Merged

Conversation

Lissy93
Copy link
Owner

@Lissy93 Lissy93 commented Jul 5, 2021

Category: Feature

Overview
Adds several new attributes into the config (under appConfig.hideComponents) to enable users to disable components that they do not need or want. This includes: Heading, Nav menu, Search bar, Settings box and footer. Also moved the splash screen attr into this object for consistency. All components are visible by default, but the user can disable those they don't want on a per-component basis, using these options. Because of this, the update will not have any effect on users, until they add these values into their config file.

As well as the feature, I've also refactored the Config Accumulator, turning it from a series of functions, into a Class. This improves efficiency, as the config file is only processed once (when the class is initiated), rather than one time for each call.

Issue Number N/A

New Vars (if applicable)

A new (optional) object variable called hideComponents has been added under appConfig. This includes the following fields:

Field Type Required Description
hideHeading boolean Optional If set to true, the page title & sub-title will not be visible. Defaults to false
hideNav boolean Optional If set to true, the navigation menu will not be visible. Defaults to false
hideSearch boolean Optional If set to true, the search bar will not be visible. Defaults to false
hideSettings boolean Optional If set to true, the settings menu will not be visible. Defaults to false
hideFooter boolean Optional If set to true, the footer will not be visible. Defaults to false
hideSplashScreen boolean Optional If set to true, splash screen will not be visible while the app loads. Defaults to true (except on first load, when the loading screen is always shown)

Screenshot: N/A

Code Quality Checklist (Please complete)

  • All changes are backwards compatible
  • All lint checks and tests are passing
  • There are no (new) build warnings or errors
  • (If a new config option is added) Attribute is outlined in the schema and documented
  • (If a new dependency is added) Package is essential, and has been checked out for security or performance

@netlify
Copy link

netlify bot commented Jul 5, 2021

✔️ Deploy Preview for dashy-dev ready!

🔨 Explore the source changes: 06d085f

🔍 Inspect the deploy log: https://app.netlify.com/sites/dashy-dev/deploys/60e34c510d518b0007dfbdf5

😎 Browse the preview: https://deploy-preview-78--dashy-dev.netlify.app/

@Lissy93 Lissy93 merged commit 6643fcf into master Jul 5, 2021
@Lissy93 Lissy93 deleted the FEATURE_show-hide-components branch August 22, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant