`ui`: auto-expand summary when diff is present. (#33668)

* ui: use details open when diff is present

* remove comment
pull/33673/head
Mauricio Alvarez Leon 7 months ago committed by GitHub
parent 368bc74dfd
commit 33952d0a60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      .github/workflows/ui_preview.yaml

@ -88,14 +88,15 @@ jobs:
A=($scenes)
DIFF=""
TABLE="<details>"
TABLE="${TABLE}<summary>All Screenshots</summary>"
open=false
TABLE="<summary>All Screenshots</summary>"
TABLE="${TABLE}<table>"
for ((i=0; i<${#A[*]}; i=i+1));
do
if ! compare -fuzz 2% -highlight-color DeepSkyBlue1 -lowlight-color Black -compose Src ${{ github.workspace }}/master_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}.png ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png; then
open=true
convert ${{ github.workspace }}/pr_ui/${A[$i]}_diff.png -transparent black mask.png
composite mask.png ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png
convert -delay 20 ${{ github.workspace }}/master_ui/${A[$i]}.png composite_diff.png -loop 0 ${{ github.workspace }}/pr_ui/${A[$i]}_diff.gif
@ -134,7 +135,11 @@ jobs:
TABLE="${TABLE}</table>"
TABLE="${TABLE}</details>"
if open; then
TABLE="<details open>${TABLE}"
else
TABLE="<details>${TABLE}"
fi
echo "DIFF=$DIFF$TABLE" >> "$GITHUB_OUTPUT"
- name: Saving proposed ui

Loading…
Cancel
Save