Skip to content
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

Fix various issues around article list / content views #1782

Merged
merged 7 commits into from
Aug 11, 2024

Conversation

barijaona
Copy link
Member

Fix issues #1722 and #1618

As the file image is already specified with a (default) standard size,
we can remove the superfluous size constraints on it.
Set vertical hugging priority to the value suggested by Xcode after
removal of the constraints.

Fixes issue ViennaRSS#1618 : changing the height of the article view while
viewing an article without enclosure made the enclosure view to not
appear anymore whenever it should.
Position the OverlayStatusBar at bottom of Unified display view
- As the problem of instable widths (for article list or article view)
are reported only with feeds having "Use Web Page for Articles" set,
reverse approach of commit c491522 and enforce a constraint while the
web page used as article view is loading
- Simplify the NSSplitView delegates as we don't need anymore to track
imbricated calls to delegates as we had to do when dealing with legacy
WebViews
- use the same delegate (ArticleListView) for the main NSSplitView and
ArticleListView's splitView2

Solves wild resizing of window with "Use Web Page for Articles" mode on
horizontal layout with feeds like https://feeds.feedburner.com/LegalInsurrection
(reported in issue ViennaRSS#1722) while preserving functionality of the main
split view.
@barijaona barijaona closed this Jul 29, 2024
Some wild resizes could still appear, with the following sequence:
- see https://feeds.feedburner.com/LegalInsurrection with the "Use Web
Page for Articles" setting, switch back and forth between vertical and
horizontal layout
- switch to another folder displayed using a built-in style, switch back
and forth between vertical and horizontal layout
@barijaona barijaona reopened this Jul 29, 2024
@Eitot
Copy link
Contributor

Eitot commented Aug 10, 2024

I have found two auto layout issues:

  1. With the enclosure bar enabled:
    a. open an article that has an enclosure
    b. change the width of the article view
    c. switch to an article that has no enclosure

There will be a blank area where the enclosure bar was.

  1. With the enclosure bar enabled:
    a. open an article that has no enclosure
    b. change the width of the article view
    c. switch to an article that has an enclosure

There will be a constraint conflict and the enclosure bar won't show.

Unable to simultaneously satisfy constraints:
(
    "<NSLayoutConstraint:0x600002d03610 V:[NSStackView:0x12c744490]-(6)-|   (active, names: '|':EnclosureView:0x10d039660 )>",
    "<NSLayoutConstraint:0x600002d03660 V:|-(7)-[NSStackView:0x12c744490]   (active, names: '|':EnclosureView:0x10d039660 )>",
    "<NSLayoutConstraint:0x600002e7b8e0 'NSStackView.Stack.Min' V:[NSView:0x12c704240]-(>=0)-[EnclosureView:0x10d039660]   (active)>",
    "<NSLayoutConstraint:0x600002e7bb10 'NSStackView.Edge.Bottom' V:[EnclosureView:0x10d039660]-(>=0)-|   (active, names: '|':NSStackView:0x10d0248c0 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x600002d10960 h=-&- v=-&- NSView:0x12c704240.minY == 0   (active, names: '|':NSStackView:0x10d0248c0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600002d03610 V:[NSStackView:0x12c744490]-(6)-|   (active, names: '|':EnclosureView:0x10d039660 )>

After resizing of one of the split views, showing enclosure view while
it was hidden, or hiding enclosure view while it was visible led to
auto-layout issues.
@barijaona barijaona requested a review from Eitot August 10, 2024 17:25
@barijaona
Copy link
Member Author

I have found two auto layout issues:

I think it's fixed now.

@barijaona barijaona merged commit f1a2c97 into ViennaRSS:master Aug 11, 2024
2 checks passed
@barijaona barijaona deleted the contentView branch August 11, 2024 13:06
@Eitot
Copy link
Contributor

Eitot commented Aug 11, 2024

Thanks. I tried figuring this out, but wasn't able to fix it. I am still wondering why WKWebView forces its containing views to change their size.

@barijaona
Copy link
Member Author

I tried figuring this out, but wasn't able to fix it.

It also took me some time to completely understand when and how one needs to take care of these translatesAutoresizingMaskIntoConstraints stuff…

I am still wondering why WKWebView forces its containing views to change their size.

I can only guess that this might be linked to the WKWebView being inside a NSStackView, which introduces some flexibility. We did not encounter the problem on other tabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants