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

Home scene rework #39

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Conversation

tegaete
Copy link

@tegaete tegaete commented Nov 16, 2022

The objective of this update is to mantain similar functionality and graphics, but fixing underlaying code so it's more friendly to continue developing new features.

Changes made:

Code structure:

  • A lot of component names were switched to be more descriptive.
  • Most components have been moved to their own folders (sub-items exclusive to one component have been left with that same component).
  • Tasks now belong in a util/Tasks.
  • The function to display numbers with "K" as thousands and "M" as millions has been replaced with a regex.
  • Top bar is now a MarkupGrid.
  • Sidebar is now a MarkupGrid.
  • Category, Following and Live are now components that I called "subscenes" and they manage some of their own behaviour.
  • HomeScene code has been simplyfied to reduce coupling. Some code has been moved to other components.

Behaviour changes:

  • Top bar and sidebar are now accessible from one another. Also sidebar is no longer focusable if it has no items.
  • Top bar is also accessible from ChannelScene.
  • The animations and display of the top bar have been changed to be more MarkupGrid friendly.

Issues fixed:

  • Fixed an issue where loading the Categories tab repeatedly would change its contents.
  • Fixed the display of sidebar and offline channels items

Tests required (this I have not been able to test):

  • Check if the app works well on SD.
  • Check no functionalities were broken due to decoupling and cleaning (I broke chat loading once).

Introduced differences that could be issues:

  • Offline channels rowlist scroll animation is slower. This is because it uses no focusFeedback to keep it similar to the original version.
  • Pressing back after selecting a channel in the CategoryScene goes directly back to HomeScene, skipping CategoryScene because of changes in the code.

@tegaete
Copy link
Author

tegaete commented Nov 22, 2022

I missinterpreted a couple of lines of code and if I remember correctly, my implementation of the sidebar doesn't let more than 10 channels to load, instead of showing 10 channels and letting you scroll down to them. This will require a quick fix: deleting the "if" in 15th line of Sidebar.brs.

Will do this at some other time.

@worldreboot
Copy link
Owner

Hey, thanks for your efforts. I don't think we would've tried cleaning up the code ever, so this is appreciated lol. Hopefully we can check this out soon

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