Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add
Harness::new_ui
,Harness::fit_contents
#5301Add
Harness::new_ui
,Harness::fit_contents
#5301Changes from 51 commits
c50394a
d5dedba
608e4df
6f2691f
e791a74
0853a52
661bc3e
87cdb17
ee3e766
e63ffa3
bba834b
b2db13d
94d0b84
f26e98d
02f734c
80381ab
7cbf557
d478162
10c0767
b4f7129
b00315b
2ac2d85
d7b874e
66a6c00
e0d8263
e1a8196
a5994d8
dcdc601
76aa7ad
da32e8c
d0a307d
0d4cebf
84977aa
2d411a8
cac6db8
311d447
ddf79ce
148e79a
24f29d6
27414ea
b2fe731
554fc57
97ecb25
c9d1bea
2b1fafa
df24f74
e824e01
7cad2da
54cf256
7f2c2ff
482921f
aadf47f
3d59719
703c702
048c69a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, should we add some margin by default? I think no margin is more correct, since it is actually what the ui is but more margin would make the screenshots look nicer. Also, should I change the background to be transparent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once #4019 is done, widget should just perfectly kiss the border, so we need some way to see that.
So I think it makes sense to add a transparent margin. The opaque background then signifies the rectangle of the
Ui
, but we can still see wether or not a widget paints outside of that area (which could be a bug)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! I added an 8px margin with transparent bg and you can immedeately see that the separator is one px too wide:
Also, I noticed that the snapshot ignores alpha, meaning a completely transparent is the same as a completely black one and the snapshot test will succeed. I'll open an issue in dify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should panic here, since we're not setting any sizing-pass specialness in the
Context
case?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an assert in #5313