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

Feature Request: change font #10

Open
6 tasks
nubesurrealista opened this issue Dec 5, 2024 · 14 comments
Open
6 tasks

Feature Request: change font #10

nubesurrealista opened this issue Dec 5, 2024 · 14 comments
Assignees
Labels
enhancement New feature or request extended issues/PRs that related with extended version help wanted Extra attention is needed waiting changes Waiting for upstream project & fork author

Comments

@nubesurrealista
Copy link

nubesurrealista commented Dec 5, 2024

First of all: good luck with this project, I think it has a future.

Since the roadmap talks about implementing requested features in Newpipe or Tubular, I just wanted you to take a look at this PR To add a font change option 👀

I'll understand if you're not interested, Well, thanks for the good work!


PM - extended

This section is added by maintainer for a better project management

Minimum requirements to merging into extended branch:

  • Already configured. build() must be last invoked method. error should be solved and this feature should not be cause any instability
  • move setting to Settings > Appearance
  • Implement this feature as separate file/method ?
  • add this feature to other tabs/sections: Subscriptions, About, Menu, Downloads, Video Title
  • Compare this PR with merging into pure NewPipe and fix things that Tubular broke for this feature
  • Ensure NewPipe/Tubular/Other PipeBender version database compatibility

Note: This Fonty library seems to be abandoned. So it'll be better if we can choose a better library, implement ours or find another solution (maybe with a newer built-in sdk version?)

@asandikci asandikci added enhancement New feature or request extended issues/PRs that related with extended version labels Dec 5, 2024
@asandikci asandikci self-assigned this Dec 5, 2024
@asandikci
Copy link
Member

Thanks 😊

PR seems good and reasonably NewPipe team does not want to add it because of the rewrite process of app. I respect the situation of team/project. Also I don't want to make this app a hard fork (if I merge this PR now and NewPipe team are going to implement this feature in a different way later, this will cause to collision between projects) So It is better to not adding this feature to main branch.

I am going to merge this feature to extended branch only for now. After the that I am planning to publish a new pre-version with different tag like v0.27.4 RC1

Is it suitable for you?

@nubesurrealista
Copy link
Author

Is it suitable for you?

Sound's interesting 👀

Thanks for the reply!

@asandikci
Copy link
Member

@asandikci
Copy link
Member

@nubesurrealista merged and built the apk
Could you please test this apk: app.zip

this is a debug version, it is foreseen that app can be slower
You can see the font setting in Content > App Font setting

@asandikci
Copy link
Member

! the app is not stable and font implementation is not app-wide yet !

see: TeamNewPipe/NewPipe#11645 (comment)

@nubesurrealista
Copy link
Author

16e51d0c-ebab-40cd-b24e-5f87fee5cbed.1.webm

Thanks for trying!!. Yep, it crashed for me:

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: ES
  • Content Language: es-ES
  • App Language: es_ES
  • Service: none
  • Version: 0.27.4
  • OS: Linux TCL/5033E/U3A_PLUS_4G:8.1.0/O11019/v7L81-0:user/release-keys 8.1.0 - 27
Crash log

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.maintainteam.lastpipebender.debug.featurerequestchangefont/org.schabi.newpipe.MainActivity}: java.lang.RuntimeException: Already configured. build() must be last invoked method.
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2937)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3015)
	at android.app.ActivityThread.-wrap11(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6666)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:583)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Caused by: java.lang.RuntimeException: Already configured. build() must be last invoked method.
	at com.marcinorlowski.fonty.Fonty$Companion.failIfConfigured(Fonty.kt:394)
	at com.marcinorlowski.fonty.Fonty$Companion.context(Fonty.kt:340)
	at com.marcinorlowski.fonty.Fonty.context(Unknown Source:2)
	at org.schabi.newpipe.MainActivity.setUpFont(MainActivity.java:215)
	at org.schabi.newpipe.MainActivity.onCreate(MainActivity.java:136)
	at android.app.Activity.performCreate(Activity.java:7029)
	at android.app.Activity.performCreate(Activity.java:7020)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1219)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2890)
	... 9 more


@asandikci
Copy link
Member

asandikci commented Dec 5, 2024

I don't know the reason for now. I'll later try with pure NewPipe + this PR and see what is going on.

@asandikci asandikci added the waiting changes Waiting for upstream project & fork author label Dec 5, 2024
@asandikci
Copy link
Member

asandikci commented Dec 6, 2024

Tried with pure NewPipe and issue still persist. So the problem is probably PR. It should be fixed by the author. I can try fixing it in my free time but no promise

pinging PR author: @u7648330

pure NewPipe + this PR: app(1).zip (still has same error but maybe you want to test this version also)

@asandikci asandikci added the help wanted Extra attention is needed label Dec 6, 2024
@brnwlshubh
Copy link

@asandikci Did you see this... as this got merged by the author?

@asandikci
Copy link
Member

I'have already merged this PR. But author committed 2 more commits after merged it into his/her own dev branch. I'll try directly merging from author's dev branch. Thanks for heads up!

@asandikci
Copy link
Member

asandikci commented Dec 6, 2024

unfortunately still gives same error :(
especially when switching video source

@asandikci
Copy link
Member

Tried to implement this feature as a separate file (util/FontManager.java) but could not get any successful build unfortunately. I gave up for now

@u7648330
Copy link

hi sorry have just seen this, may I ask what the current problem is and how I can help?

@asandikci
Copy link
Member

@u7648330 no problem.

There is an error when changing the font. You can see crash log below: #10 (comment)

Shortly: Caused by: java.lang.RuntimeException: Already configured. build() must be last invoked method.

Tried both with this fork (LastPipeBender) and original Newpipe latest dev branch with merging your commits and there is same issue in both.

Some users see this error in first app start after changing the font. I see this error after changing video source (youtube -> soundcloud for example)

Possibly error caused because of font build functions called multiple times. I'm not sure

I built both app as "debug" version and you can see the build command in .github/workflows/ci.yml in this repo.

10-feature-request-change-font branch is where I merged your commits and maybe you can take a look? Or better It would be good to update your PR in original NewPipe project and make sure the compatibility with latest version.

Ping me if any further information is needed
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extended issues/PRs that related with extended version help wanted Extra attention is needed waiting changes Waiting for upstream project & fork author
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants