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/organization logo #1041

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

spomberg
Copy link
Contributor

@spomberg spomberg commented Mar 4, 2023

Description

Displays the organization logo instead of Greenstand's if the user belongs to an organization with a logo URL available.

Issue(s) addressed

What kind of change(s) does this PR introduce?

  • Enhancement
  • Bug fix
  • Refactor

Please check if the PR fulfils these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Issue

What is the current behavior?
Currently, Greenstand's logo is displayed on the navbar and on the menu no matter what.

What is the new behavior?
Implemented a logoPath state that serves as the image source in the IconLogo component, once the user logs in, a request is made to retrieve the organization's logo URL, if there is one available the state will be set to that path so the organization logo is displayed on the navbar and menu instead of Greenstand's. If the user is logged out the logoPath state defaults to Greenstand's logo.

image

image

Breaking change

Does this PR introduce a breaking change?
No

@spomberg spomberg requested a review from a team as a code owner March 4, 2023 19:07
Copy link
Collaborator

@nmcharlton nmcharlton left a comment

Choose a reason for hiding this comment

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

Great work @spomberg, just one suggestion.

@sebastiangaertner Is this what you had in mind?
Do we enforce any kind of size restrictions on org logos?

src/components/Login.js Outdated Show resolved Hide resolved
@spomberg spomberg requested a review from nmcharlton March 7, 2023 11:41
@sebastiangaertner
Copy link
Contributor

@nmcharlton can we make it svg mandatory then the size is flexible or would it just read the stakeholder logo url?
Dimensions are not the issue here or? either square or landscape.

@nmcharlton
Copy link
Collaborator

@sebastiangaertner How do org logos get into the system? Do orgs send them to us based on some requirement?

The issue is that if we're directly replacing a wide, rectangular Greenstand logo with a square organization logo, it doesn't really fit in the space in the same way.
Judging by the web map, it would seem that all org logos are assumed to be square. If this is the case, we should tweak the design of the org logo in the Admin Panel to be optimised for a square logo.

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.

Need for organization logo in Admin Panel
3 participants