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

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

Open
Yetangitu opened this issue Mar 9, 2024 · 13 comments
Open

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

Yetangitu opened this issue Mar 9, 2024 · 13 comments

Comments

@Yetangitu
Copy link

Yetangitu commented Mar 9, 2024

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:

  • compact mode with only headlines and a (collapsible) sidebar, without the (mostly useless) content area.
  • functional context menu on headlines with 'open in new tab' and link dragging

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.

@Yetangitu Yetangitu added the bug label Mar 9, 2024
@SMillerDev SMillerDev removed the bug label Mar 10, 2024
@tuxArg
Copy link

tuxArg commented Mar 11, 2024

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
Copy link
Author

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
Copy link

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
Copy link
Contributor

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
Copy link

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
Copy link
Author

Yetangitu commented Mar 12, 2024

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
Copy link

maurerle commented Mar 17, 2024

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
Copy link
Author

@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.

maurerle added a commit to maurerle/news that referenced this issue Mar 17, 2024
overwrite custom.css according to workaround from Yetangitu to fix nextcloud#2610

Signed-off-by: Florian Maurer <[email protected]>
@Grotax
Copy link
Member

Grotax commented Mar 17, 2024

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link
Contributor

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.

@nextcloud nextcloud locked and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants