Skip to content

fix: show entity logo actions on mobile#2161

Open
GHX5T-SOL wants to merge 4 commits into
activist-org:mainfrom
GHX5T-SOL:fix/2158-mobile-entity-logo
Open

fix: show entity logo actions on mobile#2161
GHX5T-SOL wants to merge 4 commits into
activist-org:mainfrom
GHX5T-SOL:fix/2158-mobile-entity-logo

Conversation

@GHX5T-SOL
Copy link
Copy Markdown

Summary

  • add a reusable mobile entity logo/edit shortcut for organization, event, and group pages
  • show that shortcut on mobile subpages where the desktop left sidebar is hidden
  • keep the existing group edit behavior as a coming-soon toast, while organization and event shortcuts open the icon upload modal

Fixes #2158.

Validation

  • corepack yarn test test/components/entity/EntityLogoMobile.spec.ts
  • corepack yarn lint
  • corepack yarn typecheck
  • corepack yarn prettier app/components/entity/EntityLogoMobile.vue app/layouts/organization/OrganizationPage.vue app/layouts/event/EventPage.vue app/layouts/group/GroupPage.vue test/components/entity/EntityLogoMobile.spec.ts --check --config ../.prettierrc --ignore-path ../.prettierignore
  • git diff --cached --check
  • git diff --cached | gitleaks stdin --no-banner --redact --timeout 30

I also ran corepack yarn test. It executed the suite, reporting 160 passed and 2 skipped test files with 1858 passed tests, but the command exited 1 because Vitest reported three unhandled ReferenceError: window is not defined errors from test/components/form/FormTextEntity.spec.ts after the tests ran. Running corepack yarn test test/components/form/FormTextEntity.spec.ts separately passed 59 tests.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 17, 2026

Deploy Preview for activist-org ready!

Name Link
🔨 Latest commit d70e852
🔍 Latest deploy log https://app.netlify.com/projects/activist-org/deploys/6a0c64580fa0c0000846753d
😎 Deploy Preview https://deploy-preview-2161--activist-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for the pull request! ❤️

The activist team will do our best to address your contribution as soon as we can. The following are some important points:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and Development rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the Development room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

activist uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Copy Markdown
Contributor

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • Tests for changes have been written and the TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

First PR Commit Check

  • The commit messages for the remote branch of a new contributor should be checked to make sure their email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo (can be set with git config --global user.email "GITHUB_EMAIL")

@nicki182
Copy link
Copy Markdown
Collaborator

@aasimsyed there is some tests that are breaking?

@andrewtavis
Copy link
Copy Markdown
Member

I can fix the i18n-check issues.

@GHX5T-SOL
Copy link
Copy Markdown
Author

Fixed the i18n check failure in 508cb9fe by replacing the three entity-specific edit-image aria-label keys with the existing global key shape the checker expects: i18n.components._global.edit_aria_label. I also removed the now-unused sidebar-specific keys from the locale files and added the global label across the existing locales.\n\nValidated locally with:\n\nUV_HTTP_TIMEOUT=120 uv run --project ./backend i18n-check -a\ngit diff --check\ngit diff | gitleaks stdin --no-banner --redact --exit-code 1

@nicki182
Copy link
Copy Markdown
Collaborator

@GHX5T-SOL I'll take a look over it tomorrow properly to see if it works but from the code I can comment some stuff

Copy link
Copy Markdown
Collaborator

@nicki182 nicki182 left a comment

Choose a reason for hiding this comment

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

praise: @GHX5T-SOL thank you for your contribution. Actually this is something I thought of doing a while ago.
note: There is room for improvement since the issues are regarding making the component more maintainable with time. Remember to atomize and make the component as generic and independent as possible.

>
<div class="flex items-center gap-3">
<div class="relative h-16 w-16 shrink-0">
<ImageOrganization
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The component is over‑coupled because it hard‑codes v-if branches for each entityType (Organization, Event, Group) instead of accepting a simple, generic image source and fallback. This breaks reusability and separation of concerns.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 04c4a2a4. EntityLogoMobile no longer switches on entityType; the layouts now pass the image URL, fallback icon, and optional accent class, so the component stays reusable.

);

function handleEdit(): void {
if (!props.entity?.id) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can just send an emit so that it sends that edit button has been clicked

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 04c4a2a4. The edit button now only emits edit; the event and organization layouts open ModalUploadImageIcon, and the group layout keeps the existing coming-soon toast.

@nicki182
Copy link
Copy Markdown
Collaborator

@GHX5T-SOL for next time please don't overwrite the PR template this is important for us.

@GHX5T-SOL
Copy link
Copy Markdown
Author

Understood, sorry about that. I’ll preserve the project PR template on future contributions.

@GHX5T-SOL
Copy link
Copy Markdown
Author

Addressed the two review comments in 04c4a2a4.

Changes:

  • EntityLogoMobile now accepts generic display props (imgUrl, fallbackIcon, optional accentClass) instead of branching on entityType.
  • The edit button now emits edit; each layout owns the modal/toast behavior for its entity type.

Validated locally:

  • corepack yarn install --immutable
  • corepack yarn format
  • corepack yarn lint
  • corepack yarn typecheck
  • corepack yarn build
  • git diff --check
  • changed-diff gitleaks stdin --no-banner --redact --exit-code 1

Copy link
Copy Markdown
Collaborator

@nicki182 nicki182 left a comment

Choose a reason for hiding this comment

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

priase: thank you for making all the necessary changes it almost looks perfect, just make this small change and I will bring it in.
@GHX5T-SOL

const props = defineProps<{
entity: Entity | null;
accentClass?: string;
fallbackIcon: string;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would change the name to icon as a prop since that's what you are passing its not a fallback is the icon if you have it

@GHX5T-SOL
Copy link
Copy Markdown
Author

Updated this in 827b8092.

What changed:

  • Renamed the prop from fallbackIcon to icon in EntityLogoMobile.
  • Updated the event, group, and organization callers.
  • Updated the focused component spec to cover image rendering, edit emission, fallback icon rendering, and the non-editable state.

Validation run locally:

  • corepack yarn format
  • corepack yarn lint
  • corepack yarn typecheck
  • corepack yarn build
  • corepack yarn test (160 passed | 2 skipped, 1858 passed | 2 skipped | 6 todo)
  • git diff --check
  • changed-diff gitleaks scan (no leaks found)

@nicki182
Copy link
Copy Markdown
Collaborator

image @andrewtavis how do you feel about the design with mobile looking like this design wise. If it its ok for you we can bring the PR in most likely if its not, we can rethink about it.

@GHX5T-SOL GHX5T-SOL force-pushed the fix/2158-mobile-entity-logo branch from 827b809 to d70e852 Compare May 19, 2026 13:23
@GHX5T-SOL
Copy link
Copy Markdown
Author

Rebased this on current main in d70e852d and normalized the PR commit authors to the GHX5T-SOL GitHub noreply identity.

Validation run locally after the rebase:

  • corepack yarn install --immutable (completed with existing peer warning output)
  • corepack yarn format
  • corepack yarn lint
  • corepack yarn typecheck
  • corepack yarn build (completed with existing Vite chunk/dynamic import warnings)
  • corepack yarn test test/components/entity/EntityLogoMobile.spec.ts --hookTimeout 30000 (3 passed)
  • python3 -m json.tool frontend/i18n/locales/fr.json >/dev/null
  • git diff --check origin/main...HEAD
  • git diff origin/main...HEAD | gitleaks stdin --no-banner --redact --timeout 30 (no leaks found)

The same focused test without the increased hook timeout hit Nuxt setup timeout locally, so I reran it with a 30s hook timeout and it passed.

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.

Entity logos and edit shortcut not shown on mobile

3 participants