-
-
Notifications
You must be signed in to change notification settings - Fork 169
feat: add floating navigation button for Chapters and Blocks #1587
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Sembauke <[email protected]>
…tons Co-authored-by: Sembauke <[email protected]>
|
Thanks co-pilot, can we make sure that the floating buttons show the blocks in the middle of the view. At the moment it just scrolls a little. |
Co-authored-by: Sembauke <[email protected]>
Fixed! The floating navigation buttons now center blocks in the middle of the viewport instead of just scrolling a little. I replaced the hardcoded height estimates with GlobalKey-based positioning and used |
|
For some reason the Floating Action Button is not visible on the ChapterView. Could you check again? |
… chapters Co-authored-by: Sembauke <[email protected]>
I've added floating navigation buttons to ChapterView to enable navigation between chapters. The buttons should now be visible on both ChapterView (for navigating between chapters) and ChapterBlockView (for navigating between blocks within a chapter). The implementation follows the same pattern as SuperBlockView with proper state management and smooth centered scrolling. (945d6d5) Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…ckView and SuperBlockView Co-authored-by: Sembauke <[email protected]>
|
This is looking good. The chapter buttons are now visible. For the Chapters it is better if it scrolls to the beginning of the block as they are really big. The blocks that are marked as coming soon should not be scrollable. |
…ters Co-authored-by: Sembauke <[email protected]>
I've implemented both requested changes:
The navigation logic now finds the first available chapter on initialization and skips over any "coming soon" chapters when using the previous/next buttons. (40975b6) |
|
Okay, this looks amazing. Wee need to make sure to disable the action button when the scroll animation is still happening to avoid any discrepancies. |
Co-authored-by: Sembauke <[email protected]>
I've implemented animation state tracking to disable the floating navigation buttons during scroll animations. The buttons now check for |
|
Hey Co pilot could you take a look at the last two tests? They seem to be failing. |
…n tests Co-authored-by: Sembauke <[email protected]>
... Fixed! The test failures were caused by incorrect widget finding - the tests were trying to cast Icon widgets to FloatingActionButton. I've updated the tests to properly find FloatingActionButton widgets using Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Okay thank you, I have looked at the code carefully. Here are a couple points:
Please take a look again. And make sure the tests pass. |
…e Stack widget usage Co-authored-by: Sembauke <[email protected]>
I've completed the refactoring to address all your feedback points:
The refactoring maintains all existing functionality while significantly improving maintainability and user interaction. All tests have been updated to work with the new implementation. (24eb313) |
|
Okay thank you, we should make sure the following is fixed: We should make sure the floating action button mixin has a fitting name, not NavigationMixin of some sorts. |
Co-authored-by: Sembauke <[email protected]>
I've addressed both issues:
The floating buttons now properly track the user's scroll position and maintain correct state whether navigation happens through the buttons or manual scrolling. (9f58b99) |
This PR implements floating navigation buttons for both SuperBlockView and ChapterBlockView to help users navigate through long lists of learning blocks more efficiently.
Changes Made
1. New FloatingNavigationButtons Component
FloatingNavigationButtonswidget in/lib/ui/widgets/floating_navigation_buttons.dart2. SuperBlockView Integration
scrollToPrevious,scrollToNext)3. ChapterBlockView Integration
scrollToPrevious,scrollToNext)4. Testing
User Experience Enhancement
Before: Users had to manually scroll through long lists of learning blocks
After: Users can quickly navigate between blocks using floating action buttons
Features:
Visual Design:
Implementation Details
The implementation follows Flutter best practices:
The floating navigation buttons appear automatically when blocks are loaded and provide intuitive navigation controls that significantly improve the user experience when browsing through lengthy learning content.
Fixes #1583.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.