nextcloud / news

:newspaper: RSS/Atom feed reader
https://apps.nextcloud.com/apps/news
GNU Affero General Public License v3.0
841 stars 179 forks source link

[WORKAROUND] Running News 24.x under Nextcloud 28+ #2610

Open Yetangitu opened 4 months ago

Yetangitu commented 4 months ago

First but foremost: this is not a bug report, it is a workaround for those who want to keep on running News 24.x after moving to Nextcloud 28+

News 24.x does run in NC 28+ but the sidebar is not functional as it can not be scrolled and formatting is messed up. This can be fixed by adding the contents of Nextcloud 27 core/css/apps.css and core/css/mobile.css to news/css/custom.css. Assuming you used the updater you'll find a backup of previous versions of Nextcloud under the data directory in a directory named updater-xxxxxxxxxxxxx/backups/nextcloud..... (where x stands for a hexadecimal number):

# cat /var/www/nextcloud/data/updater-xxxxxxxxxxxxx/backups/nextcloud-27.a.b.c-yyyyyyyyyyyyy/core/css/apps.css >> /var/www/nextcloud/apps/news/css/custom.css
# cat /var/www/nextcloud/data/updater-xxxxxxxxxxxxx/backups/nextcloud-27.a.b.c-yyyyyyyyyyyyy/core/css/mobile.css >> /var/www/nextcloud/apps/news/css/custom.css

This incompatibility can surely be fixed in a more targeted manner but this is a quick workaround without having to plough around a ton of CSS to find the one or two lines which cause the noted problem.

Why would one wish to do so? Mostly because News 24.x offers functionality which currently is not available in (the Vue-based version of) News 25.x. The most important ones for me are:

These two are essential for me as I use News in the following way:

  1. scroll through list of headlines
  2. middle-mouse-button click articles I want to open so they get opened in new tabs.

This does not work in the Vue-based version since headlines do not have functional anchor tags.

Most feeds do not supply content in their feeds to the content pane tends to be a waste of space as it only shows a link. For the occasional feed which does offer article content I much rather have it presented in the way News 24.x does, in the headlines list where it appears when the headline is clicked and disappears when it is clicked again.

tuxArg commented 4 months ago

Hi @Yetangitu ,

Can you upload those css files please? I don't have such backups because I have upgraded many times since 28.0.0. Thanks.

Yetangitu commented 4 months ago

Here they are:

https://gist.github.com/Yetangitu/3fadd53a308bd59275b055dbe4ed230f

Copy the contents of these two files into custom.css and things should work as intended.

temporarium commented 4 months ago

This works. It does trigger a wrong signature warning on the modified custom.css, but that is to be expected.

This leads me to ask the devs: why fix something that is not broken, as in a complete rewrite of an app that works well?

SMillerDev commented 4 months ago

This leads me to ask the devs: why fix something that is not broken, as in a complete rewrite of an app that works well?

It's clearly broken unless you include all the styling that was part of an old version of Nextcloud.

temporarium commented 4 months ago

It's clearly broken unless you include all the styling that was part of an old version of Nextcloud.

No disrespect and tons of appreciation to all the devs and contributors ;-) But if all that was needed was to copy and paste some css, isn't that much simpler than rewriting the whole app?

Yetangitu commented 4 months ago

Nextcloud itself is moving - or rather has moved - to Vue so it makes sense to use the same framework. AngularJS as used in News 24.x is EOL (latest release was in 2022) so the choice goes between porting to Angular (which is quite different from AngularJS) or porting to Vue. Since Vue is what the rest of Nextcloud has been moving to since 2018 the choice seems clear and rational.

That said it would be good to know which of the many lines in the CSS files are responsible for the incompatibility with NC28. It won't be many, I did get somewhat close to how things should work by adding a few lines to custom.css. That way News 24.x remains useable (without the mentioned hack of adding whole CSS dumps) until the Vue-based version is ready for prime time. I expect the Vue-based version to be faster than the current one seeing how as Nextcloud 28 also gained quite a bit of UI-related performance when compared to previous versions.

maurerle commented 4 months ago

Here they are:

https://gist.github.com/Yetangitu/3fadd53a308bd59275b055dbe4ed230f

Copy the contents of these two files into custom.css and things should work as intended.

Thank you very much! This helped and worked as expected :)

Should someone create a PR for this, to have a working version at least for now?

I think this should not interfere even on older releases right?

Yetangitu commented 4 months ago

@SMillerDev (et. al.) would the project be interested in a PR which adds a 'compatibility' CSS file to News 24.x? If so is it known which of the many classes are the cause of the incompatibility between News 24.x and Nextcloud 28+? It is a bit of a hack to add the entire contents of apps.css and mobile.css but it does work so if nothing more is known this can keep News 24.x usable while 25+ is not feature complete yet.

Grotax commented 4 months ago

No interest from my side, the issue is that we need someone to take responsibility for the frontend.

We need people to take care of the code..

Maybe it's actually good that it's currently broken as motivation..

Yetangitu commented 4 months ago

That's what I thought and why I did not submit a PR. You are interested in PRs to bring back the missing bits I assume so I'll have a go at that. For which missing bits I am referring to see the first post in this thread.

cristodcgomez commented 4 months ago

Hey guys. User of News since a lot of time ago... Great work btw.

I'm front-end engineer, working in angular + 8 years and now moving to Nuxt. I can try to help you with the front-end. I'll be on holidays next week but after that I'll review the front-end code and see how to help here :)

disgustipated commented 4 months ago

Thank you, I can actually use the app now that I can see the sidebar again. Unsure why this change isnt a small update pushed out while the app is being rewritten.

SMillerDev commented 4 months ago

For the same reason that putting duct tape on a Boeing doesn't suddenly make it airworthy again.

The current version is practically decommissioned and does not claim to support Nextcloud 28. The rewrite is the only way to get the app in a working shape again.