Skip to content

Add photo card component and update photo component#4317

Open
gabriel-bolbotina wants to merge 10 commits intomasterfrom
add-photo-card-component
Open

Add photo card component and update photo component#4317
gabriel-bolbotina wants to merge 10 commits intomasterfrom
add-photo-card-component

Conversation

@gabriel-bolbotina
Copy link
Contributor

@gabriel-bolbotina gabriel-bolbotina commented Feb 12, 2026

I created a new component called 'Photo card' which will be used instead of MMPhoto in the Form Gallery editor for features that have multiple photos.

This component has the following configurable properties:

  • image source
  • text
  • boolean value to show text or not (the logic could be replaced based on the text property), which, by default, is set to false
  • height/width

To implement the blur using MultiEffects, I have modified the MMPhoto component by changing the round edged mask to use MultiEffects.

Here are some visuals:

Capture d’écran 2026-02-12 à 15 11 35
ScreenRecording_02-23-2026.14-05-08_1.mov

Also, I tested that MMPhoto behaves as before:
https://github.com/user-attachments/assets/bec5747e-c64c-475f-98e4-001456675e70

And the gallery photo page:
image

And the current default state of the app:

latest-visible-set-off.MP4

Added page with photo card component
Modified form gallery editor
Added larger cards for gallery page
@github-actions
Copy link

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 63191 dmg Expires: 13/05/2026 #6319
linux Build 📬 Mergin Maps 63301 x86_64 Expires: 13/05/2026 #6330
win64 Build 📬 Mergin Maps 55121 win64 Expires: 13/05/2026 #5512
Android Build 📬 Mergin Maps 762911 APK [armeabi-v7a] Expires: 13/05/2026 #7629
Android Build 📬 Mergin Maps 762951 APK [arm64-v8a] Expires: 13/05/2026 #7629
iOS Build 📬 Build number: 26.02.857011 #8570

@github-actions
Copy link

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 63211 dmg Expires: 13/05/2026 #6321
linux Build 📭 Build not yet complete or failed.
win64 Build 📬 Mergin Maps 55141 win64 Expires: 13/05/2026 #5514
Android Build 📬 Mergin Maps 763111 APK [armeabi-v7a] Expires: 13/05/2026 #7631
Android Build 📬 Mergin Maps 763151 APK [arm64-v8a] Expires: 13/05/2026 #7631
iOS Build 📬 Build number: 26.02.857211 #8572

@Withalion
Copy link
Contributor

the card footer (the blurred area) is scaled based on the card size, should we add the same logic for text size/ padding size for the text?

I would keep the state as it is, blured area size flexible and padding, text size fixed... the differences will be probably minimal and the text will fill out the spare space if necessary

@gabriel-bolbotina gabriel-bolbotina marked this pull request as ready for review February 16, 2026 07:49
Added size property
Modified text padding to adapt to the size
Added photo card in gallery that adapts to the width
@github-actions
Copy link

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 63661 dmg Expires: 18/05/2026 #6366
linux Build 📭 Build not yet complete or failed.
win64 Build 📬 Mergin Maps 55611 win64 Expires: 18/05/2026 #5561
Android Build 📬 Mergin Maps 767651 APK [arm64-v8a] Expires: 18/05/2026 #7676
Android Build 📬 Mergin Maps 767611 APK [armeabi-v7a] Expires: 18/05/2026 #7676
iOS Build 📭 Build not yet complete or failed.

@Withalion Withalion linked an issue Feb 23, 2026 that may be closed by this pull request
@gabriel-bolbotina gabriel-bolbotina changed the title Add photo card component Add photo card component and update photo component Feb 23, 2026
Copy link
Contributor

@Withalion Withalion left a comment

Choose a reason for hiding this comment

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

Plus the comments about components I wrote to you.

It would be nice for our reference to note down in MMPhoto (probably) what made the mask work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we copied the whole file into gallery and didn't reuse MMFormPhotoViewer from the app (which was specifically made for this use case) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the original MMFormViewer has the photoSketchingLoader and other dependencies were required for this to work. I think we can park the topic of testing the photo sketching in the gallery app, and just keep it a visual tool

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah we don't want to test that, can we just pass null there and make it work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried it, but it fails for the MMInput that is imported by MMFormPhotoViewer with this message "module "MMInput" is not installed". I added it to the gallery's CMakeLists. If you have any suggestions to install it or a workaround, let me know

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay yeah that won't work, we will probably need to rip apart the photosketchingcontroller from viewer first

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep that for future us :)

Added review findings
@github-actions
Copy link

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 63971 dmg Expires: 25/05/2026 #6397
linux Build 📭 Build not yet complete or failed.
win64 Build 📬 Mergin Maps 55921 win64 Expires: 25/05/2026 #5592
Android Build 📬 Mergin Maps 770711 APK [armeabi-v7a] Expires: 25/05/2026 #7707
Android Build 📬 Mergin Maps 770751 APK [arm64-v8a] Expires: 25/05/2026 #7707
iOS Build 📭 Build not yet complete or failed.

@github-actions
Copy link

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 64041 dmg Expires: 25/05/2026 #6404
linux Build 📭 Build not yet complete or failed.
win64 Build 📭 Build not yet complete or failed.
Android Build 📭 Build not yet complete or failed.
iOS Build 📭 Build not yet complete or failed.

@Withalion Withalion added the FROZEN 🥶 do not merge before upcoming release label Feb 26, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 64351 dmg Expires: 31/05/2026 #6435
linux Build 📬 Mergin Maps 64461 x86_64 Expires: 31/05/2026 #6446
win64 Build 📬 Mergin Maps 56301 win64 Expires: 31/05/2026 #5630
Android Build 📬 Mergin Maps 774511 APK [armeabi-v7a] Expires: 31/05/2026 #7745
Android Build 📬 Mergin Maps 774551 APK [arm64-v8a] Expires: 31/05/2026 #7745
iOS Build 📬 Build number: 26.03.868611 #8686

Copy link
Collaborator

@tomasMizera tomasMizera left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏻 Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FROZEN 🥶 do not merge before upcoming release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1-N relation not showing display text

3 participants