-
Notifications
You must be signed in to change notification settings - Fork 15
Tab layout #70
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
Tab layout #70
Conversation
I think this is ready for review now. Here is a quick video showing the new touch example: tab_layout_touch.mp4Requires CircuitPython Version |
@makermelissa wanna try this out? |
This works nicely in CircuitPython 7.3.0 Beta 2, but fails on anything earlier with this error including 7.2.5:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work for the latest "stable" release.
I don't think there is an easy way to make it work with current stable because it utilizes the new We could try to add a more prominent warning in the meantime, or hold off until there is a new stable release made. |
A more prominent warning would be fine. That way it doesn't look like a bug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and looks good. Thanks.
Updating https://github.com/adafruit/Adafruit_CircuitPython_floppy to 1.0.1 from e2d8f2a: < fix python version for rtd Updating https://github.com/adafruit/Adafruit_CircuitPython_VL53L1X to 1.1.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_VL53L1X#6 from kattni/update-multi-breakout-demo > Merge pull request adafruit/Adafruit_CircuitPython_VL53L1X#5 from FoamyGuy/fix_docs_link > change discord badge > Patch: Replaced discord badge image > Updated gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout to 1.19.0 from 1.18.0: > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_Layout#70 from FoamyGuy/tab_layout > change discord badge > Patch: Replaced discord badge image > Updated gitignore Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_floppy
For folks who want to help test future PRs out, as a newbie I struggled to figure out the practical steps to test this example. Eventually figured it out. Steps to test
Tree view for referenceClick here to expand my file tree view/Volumes/CIRCUITPY
├── adafruit_displayio_layout
│ ├── __init__.py
│ ├── layouts
│ │ ├── __init__.py
│ │ ├── grid_layout.py
│ │ ├── page_layout.py
│ │ └── tab_layout.py
│ └── widgets
│ ├── __init__.py
│ ├── cartesian.py
│ ├── control.py
│ ├── easing.py
│ ├── flip_input.py
│ ├── icon_animated.py
│ ├── icon_widget.py
│ ├── switch_round.py
│ └── widget.py
├── boot_out.txt
├── code.py
├── examples
│ ├── bmps
│ │ ├── active_tab_sprite.bmp
│ │ ├── active_tab_sprite.bmp.license
│ │ ├── inactive_tab_sprite.bmp
│ │ └── inactive_tab_sprite.bmp.license
│ ├── displayio_layout_cartesian_advanced_test.py
│ ├── displayio_layout_cartesian_lineplot.py
│ ├── displayio_layout_cartesian_simpletest.py
│ ├── displayio_layout_flip_input_simpletest.py
│ ├── displayio_layout_grid_layout_get_cell_test.py
│ ├── displayio_layout_gridlayout_dividers.py
│ ├── displayio_layout_gridlayout_pygame_display_simpletest.py
│ ├── displayio_layout_gridlayout_simpletest.py
│ ├── displayio_layout_icon_animated_simpletest.py
│ ├── displayio_layout_page_layout_advancedtest.py
│ ├── displayio_layout_page_layout_simpletest.py
│ ├── displayio_layout_pygame_display_switch_round.py
│ ├── displayio_layout_simpletest.py
│ ├── displayio_layout_switch_multiple.py
│ ├── displayio_layout_switch_simpletest.py
│ ├── displayio_layout_tab_layout_simpletest.py
│ ├── displayio_layout_tab_layout_touchtest.py
│ ├── fonts
│ │ ├── DSEG14Classic-Regular-64-ModS.pcf
│ │ └── DSEG14Classic-Regular-64-ModS.pcf.license
│ └── icons
│ ├── Play_48x48_small.bmp
│ └── Play_48x48_small.bmp.license Test resultsCircuitPython 7.3.0-beta.2
|
@aioue thanks again for posting these details for other folks to find. Here is the process I usually use for testing: Check out the pr branch (the gh command line tool makes this super easy Copy the modified library from the PR branch to your device inside of
If there are other requisite files copy them into the root of your CIRCUITPY drive (including any containing directories). So in this case you'd have:
Lastly we want to get the example script onto the device and named Either 1) copy Or 2) open I don't think either way is really more proper than the other. I'd say go with whatever feels best / easiest / most convenient to you. |
This adds a new TabLayout class with a simpletest example illustrating it's usage.
Also changed
_page_content_list
inside page_layout to be public (no leading underscore) because its reasonable for code outside of it to make use of that attribute, which the TabLayout does.Also noticed page_layout wasn't include in api.rst for the docs so I added that as well.