Comments (4)
Thanks for the feedback.
I've been trying to get the relevant info on screen with the rich Table interface but it has its own quirks when setting total and columns width.
Ive indeed taken the simple approach to set the width to 110.
As this is an accessibility issue for you I will address this,
but will likely need to drop, or abbreviate/ or fold some columns to fit to 80 characters.
Can you help by letting me know which of the columns are most relevant to you ?
- table.add_column("Serial", overflow="fold")
- table.add_column("Family")
- table.add_column("Port")
- table.add_column("Board", overflow="fold") # Board _ID and description on separate lines
- table.add_column("Variant") # TODO: not a current column
- table.add_column("CPU")
- table.add_column("Version")
- table.add_column("build", justify="right")
Also - is there anything I should take into account wrt to the colors ?
from micropython-stubber.
I've been doing some testing with adjusting depending on the detected terminal width, would like your feedback on these
- removed the static width setting
- the Build column is only shown if there is data to be shown.
- removed the default padding
- serial ports on unix are stripped of the leading
/dev/
if the console.width < 100 :
- use abbriviations for long headers
- truncate the familiy to max 4 chars
- set the version max_width to 8
- use abbriveations for the family
this results in :
80 column list
┏━━━━━┳━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━┓
┃Ser. ┃Fam.┃Port ┃Board ┃CPU ┃Version ┃Bld┃
┡━━━━━╇━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━┩
│COM27│cpy │nRF52840│UNKNOWN_BOARD │nRF52840 │v8.2.10 │ │
│ │ │ │nice!nano with nRF52840 │ │ │ │
│COM8 │upy │samd │SEEED_WIO_TERMINAL │SAMD51P19A│v1.23.0-│341│
│ │ │ │Wio Terminal D51R with SAMD51P19A│ │preview │ │
└─────┴────┴────────┴─────────────────────────────────┴──────────┴────────┴───┘
>= 100 char terminal
note that the table is still only 99 chars wide; this is driven by the length of the descriptions.
Connected boards
┏━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━┓
┃Serial┃Family ┃Port ┃Board ┃CPU ┃Version ┃Build┃
┡━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━┩
│COM27 │circuitpython│nRF52840│UNKNOWN_BOARD │nRF52840 │v8.2.10 │ │
│ │ │ │nice!nano with nRF52840 │ │ │ │
│COM8 │micropython │samd │SEEED_WIO_TERMINAL │SAMD51P19A│v1.23.0-preview│ 341│
│ │ │ │Wio Terminal D51R with SAMD51P19A│ │ │ │
└──────┴─────────────┴────────┴─────────────────────────────────┴──────────┴───────────────┴─────┘
if this works for you - then there is no need for now to drop any columns ,
and if I need to add Variant later, then it can probably be added in the Board column
from micropython-stubber.
Can you help by letting me know which of the columns are most relevant to you ?
Essential:
1. table.add_column("Serial", overflow="fold") 4. table.add_column("Board", overflow="fold") # Board _ID and description on separate lines 7. table.add_column("Version")
Useful (especially in truncated form):
2. table.add_column("Family")
Duplicated/implied in the Board column:
3. table.add_column("Port") 6. table.add_column("CPU")
Can't see a use for (and could quickly find out from the REPL):
8. table.add_column("build", justify="right") 5. table.add_column("Variant") # TODO: not a current column
Also - is there anything I should take into account wrt to the colors ?
I can't comment on how they work for other people, but they're good and contrasty here. I'm not a screen reader user, but I know a lot of screen readers get very shouty if they see bold or italics
from micropython-stubber.
Thanks,
Ive made the Port and CPU columns drop out on terminals <100 characters.
I use the Build to keep track of different preview versions - so Ill keep that , but its displayed only if there is any info in it.
The result is :
mpflash list
Connected boards
┏━━━━━┳━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━┓
┃Ser. ┃Fam.┃Board ┃Version ┃Bld┃
┡━━━━━╇━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━┩
│COM27│cpy │UNKNOWN_BOARD │v8.2.10 │ │
│ │ │nice!nano with nRF52840 │ │ │
│COM8 │upy │SEEED_WIO_TERMINAL │v1.23.0-preview│341│
│ │ │Wio Terminal D51R with SAMD51P19A│ │ │
└─────┴────┴─────────────────────────────────┴───────────────┴───┘
Based on you comment about shouty screenreaders I did a quick test with Windows narrator and I found that the progress bar updates were leading to a highly annoying an repetitive narration.
I could not hear a difference between Bold/Italics - so I've left these as is for now.
I lowered the update frequency on that to find - what I think is a balance between visual and narrative updates.
from micropython-stubber.
Related Issues (20)
- MPFlash unnecessarily verbose error message HOT 2
- mpflash: rp2 download fails HOT 3
- Mpflash error flashing blank esp32
- Mpflash error flashing. UF2 on macos HOT 1
- MPflash: unable to flash rp2040 /.uf2 on macos HOT 13
- mpflash: does not identify 'ESP32 module with ESP32' v1.13 HOT 1
- mpflash: Failing flash without --serial HOT 4
- mpflash: Improve HTTP error handling HOT 3
- Mpflash - : use 1200 Bd to reset boards to bootloader HOT 2
- Add tls module HOT 1
- mpflash: unable to download PICO firmware due to changed BOARD_ID HOT 4
- mpflash: non-zero return code to indicate no device found HOT 7
- MPFlash: Failed flash in CI should return error HOT 1
- stubber createstubs aborts on error while stubbing one board
- MPFlash: ask_input tests fail in CI
- MPFlash: implement erase for RPI_PICO and other boards
- stubber: get_frozen fails for ARDUINO boards that depend on arduino_lib HOT 1
- mpflash: Add merge option
- stubber: malformed usocket.pyi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micropython-stubber.