Skip to content

feat: add custom branding with icon, brand name and color #1657

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

Open
wants to merge 8 commits into
base: alpha
Choose a base branch
from

Conversation

stepanic
Copy link

parse-dashboard-config.json is improved with this options:

...
"customBrandIcon": "scanshop-logo-transparent.svg",
"customBrandTitle": "ScanShop Dashboard",
"customBrandColorPrimary": "#00A0FF",
...

NOTE: favicon and HTML title are on purpose kept unchanged and background color inside of React app.

This is initial version of custom branding, any more advanced custom branding could be implemented in another PR.

From default sidebar
default-sidebar
to branded sidebar
branded-sidebar

From default login form
default-login-form
to branded login form
branded-login-form

@ghost
Copy link

ghost commented Feb 20, 2021

Danger run resulted in 1 warning; to find out more, see the checks page.

Generated by 🚫 dangerJS

return (
<div className={styles.login} style={{ marginTop: this.props.marginTop || '-220px' }}>
<Icon width={80} height={80} name='infinity' fill='#093A59' />
{!customBrandIcon && <Icon width={80} height={80} name='infinity' fill='#093A59' />}
{customBrandIcon && <img src={'appicons/' + customBrandIcon} width={80} height={80} alt="Custom BRAND icon"/>}
Copy link
Member

Choose a reason for hiding this comment

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

Can we put customBrandTitle into alt attribute, if available? Otherwise "Brand Logo" should be enough I think.

Copy link
Author

Choose a reason for hiding this comment

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

I changed this.

@stepanic
Copy link
Author

@404-html the both comments solved.

@mtrezza
Copy link
Member

mtrezza commented Sep 4, 2021

@stepanic Thanks for this PR! And apologies that it didn't get much review attention anymore. We are on a spree now to close all open PRs. Could you rebase this on master and resolve any merge conflicts? It would be amazing if we could get this merged!

@stepanic
Copy link
Author

stepanic commented Sep 5, 2021

@stepanic Thanks for this PR! And apologies that it didn't get much review attention anymore. We are on a spree now to close all open PRs. Could you rebase this on master and resolve any merge conflicts? It would be amazing if we could get this merged!

@mtrezza conflict was resolved.

@mtrezza
Copy link
Member

mtrezza commented Sep 5, 2021

That was amazingly fast! I'll review this feature, @404-html do you maybe have any input in the meantime?

@404-html
Copy link
Member

404-html commented Sep 5, 2021

Nothing new from me, thanks for asking. I left some suggestions back in the day but nothing urgent 👍

@mtrezza
Copy link
Member

mtrezza commented Sep 5, 2021

Great! Could you look through the suggestions and see which ones you would mark as resolved? It seems most have been addressed.

@stepanic
Copy link
Author

stepanic commented Sep 5, 2021

@404-html I see that you left suggestions on 2021-05-19, which are only README related will you commit them and then integrate this PR?

@404-html
Copy link
Member

404-html commented Sep 7, 2021

Sorry @stepanic, looks like I don't have permission:
image
Also, I can't see an option to resolve those. Is there any "Apply" button next to my suggestions? If not I think we can skip them, they are minor.

404-html
404-html previously approved these changes Sep 7, 2021
@mtrezza
Copy link
Member

mtrezza commented Sep 7, 2021

@404-html This may be if you had write access at some point. We have recently changes our permission model and are limiting write permissions to reviewers to are active on a regular basis, for security reasons, because the write permissions are quite wide-ranging.

@stepanic Could you incorporate the change suggestions and resolve the conversations that have been addressed? Then we can easily see whether there are any open questions. I'm preparing a release, so it would be great to get this feature in there.

stepanic and others added 3 commits September 8, 2021 22:52
Co-authored-by: 404-html <[email protected]>
Co-authored-by: 404-html <[email protected]>
Co-authored-by: 404-html <[email protected]>
@stepanic
Copy link
Author

stepanic commented Sep 8, 2021

@mtrezza @404-html suggestions commited

@mtrezza
Copy link
Member

mtrezza commented Sep 9, 2021

@stepanic There have been some merges on master, could you please rebase/merge and then request a review?

* upstream/master:
  docs: Update node in README
  Update sass and docker (parse-community#1792)
  ci: Remove parse server dev dependency (parse-community#1796)
  ci: modernize steps (parse-community#1789)
  fix(docker): increase node version in docker to 12 (parse-community#1788)
  Fix: Update CLP for new class (parse-community#1785)
  feat: Add MFA to Dashboard (parse-community#1624)
  ci: refactor docker ci (parse-community#1786)
  ci: Fix docker image pushing to Docker Hub (parse-community#1781)
@stepanic
Copy link
Author

@mtrezza merged with master without conflicts :D

$ git merge upstream/master
Auto-merging src/components/LoginForm/LoginForm.react.js
Removing server.js
Auto-merging README.md
Merge made by the 'recursive' strategy.
 .github/workflows/ci.yml                    |  169 +++-
 .github/workflows/docker-publish.yml        |   62 ++
 CHANGELOG.md                                |    8 +
 Dockerfile                                  |    4 +-
 Parse-Dashboard/Authentication.js           |   34 +-
 Parse-Dashboard/CLI/mfa.js                  |  225 +++++
 Parse-Dashboard/CLI/utils.js                |    7 +
 Parse-Dashboard/CLIHelper.js                |    6 +
 Parse-Dashboard/index.js                    |   11 +
 README.md                                   |   43 +-
 ci/CiVersionCheck.js                        |  290 ++++++
 ci/ciCheck.js                               |   36 +
 ci/nodeEngineCheck.js                       |  187 ++++
 package-lock.json                           | 5489 +++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------
 package.json                                |   22 +-
 server.js                                   |   19 -
 src/components/LoginForm/LoginForm.react.js |    1 +
 src/dashboard/Dashboard.js                  |    2 +
 src/lib/stores/SchemaStore.js               |    4 +-
 src/login/Login.js                          |   39 +-
 20 files changed, 3332 insertions(+), 3326 deletions(-)
 create mode 100644 .github/workflows/docker-publish.yml
 create mode 100644 Parse-Dashboard/CLI/mfa.js
 create mode 100644 Parse-Dashboard/CLI/utils.js
 create mode 100644 Parse-Dashboard/CLIHelper.js
 create mode 100644 ci/CiVersionCheck.js
 create mode 100644 ci/ciCheck.js
 create mode 100644 ci/nodeEngineCheck.js
 delete mode 100755 server.js

@mtrezza mtrezza changed the title Custom branding with custom icon, title and color feat: add custom branding with icon, title and color Sep 16, 2021
@mtrezza
Copy link
Member

mtrezza commented Sep 16, 2021

@stepanic Could you please merge master into this? It again became out-of-date with the base branch. I'll make sure to review this next, so you don't have to do this again.

* upstream/master:
  fix: revert parse-community#1706 which introduced new database index requirements for pagination (parse-community#1800)
@stepanic
Copy link
Author

@mtrezza merged again :D

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

This is looking good! A few notes:

  • The path for customBrandIcon seems to be hard coded to .../appicons/<file>. Can you use the path specified in the existing iconsFolder config option instead? That is the path used for app specific icons, I guess it can also be used for this purpose since they are related.

  • Could you remove the custom... prefix from the new options, e.g. rename customBrandIcon to brandIcon. Any option is inherently a customization. And please also remove custom... from the code variables to keep the relation between code and feature.

  • Could you rename customBrandTitle to brandName, a "brand name" is a more commonly known term.

  • Could you rename customBrandColorPrimary to brandPrimaryBackgroundColor, similar to the existing primaryBackgroundColor for apps. I can imagine that in the future someone may add a brandPrimaryForegroundColor color to specify the text color.

  • There seems to be a layout issue, in the top left title bar:

    image

    previously it was:

    image

    which was also not optimal, because the title and user are not vertically centered. Maybe, while you are at it, you could fix this and center the text, if not, a future PR can do this. It should be centered, regardless of whether there is a username or not (if you have no users set in dashboard config).

@mtrezza mtrezza changed the title feat: add custom branding with icon, title and color feat: add custom branding with icon, brand name and color Sep 19, 2021
@mtrezza
Copy link
Member

mtrezza commented Sep 27, 2021

@stepanic If you have some time, it would be great if you could look over the feedback above, so we can merge this PR.

@mtrezza mtrezza linked an issue Oct 20, 2021 that may be closed by this pull request
3 tasks
@mtrezza
Copy link
Member

mtrezza commented Oct 20, 2021

@visualfanatic If you are interested in completing this PR, I think there is not much missing. The feature now has a bounty applied to it since the PR has become stale.

@mtrezza mtrezza mentioned this pull request Oct 20, 2021
5 tasks
@andreafalzetti
Copy link

I would love to see this landing!

@mtrezza
Copy link
Member

mtrezza commented Nov 21, 2021

@andreafalzetti Feel free to pick it up if you like, it seems to be almost done.

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.

Add custom branding with icon, brand name and color
4 participants