From a20a22bad802fdf824728dc59dc8fa5678ee82ea Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Fri, 16 May 2025 15:30:06 +0200 Subject: [PATCH] Hide "id with ai button" for no media or sound only (#2896) * Add Boolean to control button being shown Same Button component, only with changed indentation * Apply margin between buttons to hide button instead * Move left margin to container Because ID button is now optional but container is not. * Increase margin between buttons Not part of the ticket, but it was not according to designs. * Use existing state for the button * Update integration test * Update duplicate testID * Add unit test for showing button behaviour based on photos --- .../ObsEdit/IdentificationSection.js | 48 ++++++++++--------- .../navigation/Suggestions.test.js | 23 +++++---- .../ObsEdit/IdentificationSection.test.js | 17 +++++++ 3 files changed, 57 insertions(+), 31 deletions(-) diff --git a/src/components/ObsEdit/IdentificationSection.js b/src/components/ObsEdit/IdentificationSection.js index 5a2066935..60e33df9b 100644 --- a/src/components/ObsEdit/IdentificationSection.js +++ b/src/components/ObsEdit/IdentificationSection.js @@ -85,33 +85,37 @@ const IdentificationSection = ( { -