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

Show a workspace image placeholder if no logo has been uploaded #9042

Open
Bonapara opened this issue Dec 12, 2024 · 12 comments
Open

Show a workspace image placeholder if no logo has been uploaded #9042

Bonapara opened this issue Dec 12, 2024 · 12 comments
Assignees
Labels
prio: high scope: front Issues that are affecting the frontend side only size: short type: design improvement

Comments

@Bonapara
Copy link
Member

Current behavior

Nothing is displayed when no workspace icon has been set

Image

Desired Behavior

Display a 16px icon placeholder

Image

Image

https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=436-22577&node-type=frame&t=1MbeI6xDAAaFJjM2-11

@muraliSingh7
Copy link
Contributor

@Bonapara if logo is undefined currently we have something called as DEFAULT_WORKSPACE_LOGO. If you want to display 16px placeholder we can use Avatar for it instead of DEFAULT_WORKSPACE_LOGO.

@Bonapara
Copy link
Member Author

Bonapara commented Dec 12, 2024

Yes we can replace the default logo with the avatar!

@muraliSingh7
Copy link
Contributor

@Bonapara So should I fix it ?

@Bonapara
Copy link
Member Author

Yes please @muraliSingh7!

@Bonapara
Copy link
Member Author

Thanks for contributing

@muraliSingh7
Copy link
Contributor

@Bonapara Can I commit the fix for this issue to my existing pull request, or should I wait until the current PR of mine for another issue gets reviewed ?

@Bonapara
Copy link
Member Author

Thanks @muraliSingh7. I think doing another PR for easier and faster review would be better!

charlesBochet added a commit that referenced this issue Dec 17, 2024
…NavigationDrawerHeader (#9093)

This PR addresses issue #9042

- Replaced the styled logo with the `Avatar` component.
- `Avatar` now handles the case when no `logo` is uploaded by using the
workspace name's first character as the `placeholder`.
- This ensures a consistent fallback when the `logo` is undefined.

---------

Co-authored-by: guillim <[email protected]>
Co-authored-by: Félix Malfait <[email protected]>
Co-authored-by: Charles Bochet <[email protected]>
@muraliSingh7
Copy link
Contributor

@Bonapara Please check once and close the issue as the PR for this issue has been merged

@Bonapara
Copy link
Member Author

@muraliSingh7, in local, removing the "Acme" icon put the Twenty icon back 🤔 Maybed did I miss something?

"Image

@muraliSingh7
Copy link
Contributor

@Bonapara
Can you confirm if Acme icon is set up via twenty/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts at line 45 ?

@Bonapara
Copy link
Member Author

Yes! } = {
[SEED_APPLE_WORKSPACE_ID]: {
id: workspaceId,
displayName: 'Apple',
domainName: 'apple.dev',
subdomain: 'apple',
inviteHash: 'apple.dev-invite-hash',
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/apple-logo.png',
activationStatus: WorkspaceActivationStatus.ACTIVE,
},
[SEED_ACME_WORKSPACE_ID]: {
id: workspaceId,
displayName: 'Acme',
domainName: 'acme.dev',
subdomain: 'acme',
inviteHash: 'acme.dev-invite-hash',
logo: 'https://logos-world.net/wp-content/uploads/2022/05/Acme-Logo-700x394.png',
activationStatus: WorkspaceActivationStatus.ACTIVE,
},
};

@charlesBochet
Copy link
Member

I've made a follow up here: #9129

charlesBochet added a commit that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio: high scope: front Issues that are affecting the frontend side only size: short type: design improvement
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants