Skip to content

Commit f70bc2c

Browse files
committed
test: add integration tests for float class modernization
Add integration test covering all float/align scenarios: - :align: left/right/center on figures (via Twig alignMap) - :class: float-left/float-right on figures and images (rewritten) - :align: left/right on standalone images - Mixed legacy + extra classes (float-left with-shadow) - Simultaneous :align: + :class: overlap (doubled class, harmless) Verify deprecation warnings are emitted with correct file/line context for both FigureDirective (4 warnings) and ImageDirective (2 warnings). Update render test documentation to use :align: (recommended path) and remove legacy deprecation examples (covered by integration test).
1 parent 388510a commit f70bc2c

7 files changed

Lines changed: 513 additions & 5 deletions

File tree

Documentation-rendertest/ImagesAndFigures/FloatAndAlignment.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ Float and alignment
1313
:local:
1414

1515

16+
.. _images-float-image-left:
17+
1618
Image float left
1719
================
1820

1921
.. |example-teaser-left| image:: ../images/q150_cccccc.png
2022
:alt: Left floating image
21-
:class: float-left with-shadow
23+
:class: float-start with-shadow
2224

2325
|example-teaser-left|
2426
Typesetting is the composition of text by means of arranging physical
@@ -32,12 +34,14 @@ visual display.
3234
Floating cleared. Below the image.
3335

3436

37+
.. _images-float-image-right:
38+
3539
Image float right
3640
=================
3741

3842
.. |example-teaser-right| image:: ../images/q150_cccccc.png
3943
:alt: Right floating image
40-
:class: float-right with-shadow
44+
:class: float-end with-shadow
4145

4246
|example-teaser-right|
4347
Typesetting is the composition of text by means of arranging physical
@@ -51,12 +55,15 @@ visual display.
5155
Floating cleared. Below the image.
5256

5357

58+
.. _images-float-figure-left:
59+
5460
Figure float left
5561
=================
5662

5763
.. figure:: ../images/q150_cccccc.png
5864
:alt: Left floating figure
59-
:class: float-left with-shadow
65+
:align: left
66+
:class: with-shadow
6067

6168
A figure floated to the left
6269

@@ -72,12 +79,15 @@ could be a manuscript, a previously composed version, or a plain text.
7279
Floating cleared. Below the figure.
7380

7481

82+
.. _images-float-figure-right:
83+
7584
Figure float right
7685
==================
7786

7887
.. figure:: ../images/q150_cccccc.png
7988
:alt: Right floating figure
80-
:class: float-right with-shadow
89+
:align: right
90+
:class: with-shadow
8191

8292
A figure floated to the right
8393

@@ -93,6 +103,8 @@ could be a manuscript, a previously composed version, or a plain text.
93103
Floating cleared. Below the figure.
94104

95105

106+
.. _images-float-align-left:
107+
96108
Figure align left
97109
=================
98110

@@ -114,6 +126,8 @@ could be a manuscript, a previously composed version, or a plain text.
114126
Floating cleared. Below the figure.
115127

116128

129+
.. _images-float-align-right:
130+
117131
Figure align right
118132
==================
119133

Documentation-rendertest/ImagesAndFigures/Zoom.rst

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Zoom
1313
:local:
1414

1515

16+
.. _images-zoom-lightbox:
17+
1618
Zoom: Lightbox
1719
==============
1820

@@ -29,20 +31,24 @@ the bottom-right corner of the image.
2931
- Shadow
3032
- Border + Shadow
3133
* - .. figure:: ../images/q150_f8f8f8.png
34+
:alt: Figure with lightbox zoom
3235
:zoom: lightbox
3336

3437
Figure
3538
- .. figure:: ../images/q150_eeeeee.png
39+
:alt: Figure with lightbox zoom and border
3640
:zoom: lightbox
3741
:class: with-border
3842

3943
Figure + border
4044
- .. figure:: ../images/q150_dddddd.png
45+
:alt: Figure with lightbox zoom and shadow
4146
:zoom: lightbox
4247
:class: with-shadow
4348

4449
Figure + shadow
4550
- .. figure:: ../images/q150_cccccc.png
51+
:alt: Figure with lightbox zoom, border and shadow
4652
:zoom: lightbox
4753
:class: with-border with-shadow
4854

@@ -64,6 +70,8 @@ the bottom-right corner of the image.
6470
:class: with-border with-shadow
6571

6672

73+
.. _images-zoom-gallery:
74+
6775
Zoom: Gallery
6876
=============
6977

@@ -78,18 +86,21 @@ Gallery Group A (screenshots):
7886
:widths: 33 33 33
7987

8088
* - .. figure:: ../images/q150_f8f8f8.png
89+
:alt: Screenshot 1 in gallery group
8190
:zoom: gallery
8291
:gallery: screenshots
8392
:class: with-border with-shadow
8493

8594
Screenshot 1
8695
- .. figure:: ../images/q150_eeeeee.png
96+
:alt: Screenshot 2 in gallery group
8797
:zoom: gallery
8898
:gallery: screenshots
8999
:class: with-border with-shadow
90100

91101
Screenshot 2
92102
- .. figure:: ../images/q150_dddddd.png
103+
:alt: Screenshot 3 in gallery group
93104
:zoom: gallery
94105
:gallery: screenshots
95106
:class: with-border with-shadow
@@ -113,6 +124,8 @@ Gallery Group B (photos):
113124
:class: with-border with-shadow
114125

115126

127+
.. _images-zoom-lens:
128+
116129
Zoom: Lens
117130
==========
118131

@@ -130,20 +143,24 @@ keyboard (Enter to toggle, arrows to move) for accessibility.
130143
- Shadow
131144
- Border + Shadow
132145
* - .. figure:: ../images/q150_f8f8f8.png
146+
:alt: Figure with lens zoom
133147
:zoom: lens
134148

135149
Figure
136150
- .. figure:: ../images/q150_eeeeee.png
151+
:alt: Figure with lens zoom and border
137152
:zoom: lens
138153
:class: with-border
139154

140155
Figure + border
141156
- .. figure:: ../images/q150_dddddd.png
157+
:alt: Figure with lens zoom and shadow
142158
:zoom: lens
143159
:class: with-shadow
144160

145161
Figure + shadow
146162
- .. figure:: ../images/q150_cccccc.png
163+
:alt: Figure with lens zoom, border and shadow
147164
:zoom: lens
148165
:class: with-border with-shadow
149166

@@ -165,6 +182,8 @@ keyboard (Enter to toggle, arrows to move) for accessibility.
165182
:class: with-border with-shadow
166183

167184

185+
.. _images-zoom-inline:
186+
168187
Zoom: Inline
169188
============
170189

@@ -181,20 +200,24 @@ icon indicates scroll zoom is available. Keyboard: +/- to zoom, arrows to pan.
181200
- Shadow
182201
- Border + Shadow
183202
* - .. figure:: ../images/q150_f8f8f8.png
203+
:alt: Figure with inline zoom
184204
:zoom: inline
185205

186206
Figure
187207
- .. figure:: ../images/q150_eeeeee.png
208+
:alt: Figure with inline zoom and border
188209
:zoom: inline
189210
:class: with-border
190211

191212
Figure + border
192213
- .. figure:: ../images/q150_dddddd.png
214+
:alt: Figure with inline zoom and shadow
193215
:zoom: inline
194216
:class: with-shadow
195217

196218
Figure + shadow
197219
- .. figure:: ../images/q150_cccccc.png
220+
:alt: Figure with inline zoom, border and shadow
198221
:zoom: inline
199222
:class: with-border with-shadow
200223

@@ -216,7 +239,9 @@ icon indicates scroll zoom is available. Keyboard: +/- to zoom, arrows to pan.
216239
:class: with-border with-shadow
217240

218241

219-
Zoom Indicator Options
242+
.. _images-zoom-indicator-options:
243+
244+
Zoom indicator options
220245
======================
221246

222247
The zoom indicator can be hidden using ``:zoom-indicator: false``:
@@ -227,11 +252,13 @@ The zoom indicator can be hidden using ``:zoom-indicator: false``:
227252
* - With indicator (default)
228253
- Without indicator
229254
* - .. figure:: ../images/q150_f8f8f8.png
255+
:alt: Figure with zoom indicator visible
230256
:zoom: lightbox
231257
:class: with-border with-shadow
232258

233259
Indicator visible
234260
- .. figure:: ../images/q150_eeeeee.png
261+
:alt: Figure with zoom indicator hidden
235262
:zoom: lightbox
236263
:zoom-indicator: false
237264
:class: with-border with-shadow

0 commit comments

Comments
 (0)