Commit 89ba0e5
committed
bug symfony#59390 [VarDumper] Fix blank strings display (MatTheCat)
This PR was merged into the 6.4 branch.
Discussion
----------
[VarDumper] Fix blank strings display
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#57980
| License | MIT
Because `sf-dump-ellipsis` `span`s needed a `text-ellipsis`, their overflowing content was cut using `overflow: hidden`. As it required their inner display type to be `block`, this broke the alignment with the ellipsis’ “tail”. This was fixed by symfony#53147 by making every dump’s `span`s `inline-flex`.
This change made `sf-dump-ellipsis`’ `display`, `max-width` and `vertical-align` properties useless so this PR removes them, as well as a duplicated `overflow` one.
Now, `inline-flex` elements’ content becomes flex items, which caused symfony#57980 because
> if the entire sequence of [a flex item’s] text runs contains only white space […] it is […] not rendered
>
> https://www.w3.org/TR/css-flexbox-1/#flex-items
Instead of making every dump’s `span`s `inline-flex`, this PR targets a new `sf-dump-ellipsization` class added to `sf-dump-ellipsis`’ parents.
It also wraps ellipsis tails with elements bearing the `sf-dump-ellipsis-tail` class so that we can prevent them to shrink:
**Before**:

**After**:

Commits
-------
b0c2a59 [VarDumper] Fix blank strings displayFile tree
4 files changed
+59
-54
lines changed- src/Symfony/Component/VarDumper
- Dumper
- Tests
- Caster
- Dumper
4 files changed
+59
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
685 | | - | |
686 | 684 | | |
687 | | - | |
688 | 685 | | |
689 | 686 | | |
690 | | - | |
691 | 687 | | |
692 | | - | |
693 | | - | |
| 688 | + | |
| 689 | + | |
694 | 690 | | |
695 | 691 | | |
696 | 692 | | |
| |||
863 | 859 | | |
864 | 860 | | |
865 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
866 | 865 | | |
867 | | - | |
| 866 | + | |
868 | 867 | | |
869 | | - | |
| 868 | + | |
870 | 869 | | |
871 | | - | |
| 870 | + | |
872 | 871 | | |
873 | | - | |
874 | 872 | | |
875 | 873 | | |
876 | 874 | | |
877 | 875 | | |
878 | 876 | | |
879 | 877 | | |
880 | | - | |
| 878 | + | |
881 | 879 | | |
882 | | - | |
| 880 | + | |
883 | 881 | | |
884 | | - | |
| 882 | + | |
885 | 883 | | |
886 | 884 | | |
887 | 885 | | |
888 | | - | |
| 886 | + | |
| 887 | + | |
889 | 888 | | |
890 | | - | |
| 889 | + | |
891 | 890 | | |
892 | 891 | | |
893 | | - | |
894 | | - | |
| 892 | + | |
| 893 | + | |
895 | 894 | | |
896 | 895 | | |
897 | 896 | | |
898 | | - | |
| 897 | + | |
899 | 898 | | |
900 | | - | |
| 899 | + | |
901 | 900 | | |
902 | 901 | | |
903 | 902 | | |
904 | 903 | | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
919 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
920 | 924 | | |
921 | | - | |
922 | | - | |
| 925 | + | |
| 926 | + | |
923 | 927 | | |
924 | | - | |
925 | | - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
926 | 931 | | |
927 | 932 | | |
928 | 933 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
| 262 | + | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
| 266 | + | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
| 104 | + | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
0 commit comments