Giter Club home page Giter Club logo

Comments (4)

Josverl avatar Josverl commented on July 24, 2024

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 ?

  1. table.add_column("Serial", overflow="fold")
  2. table.add_column("Family")
  3. table.add_column("Port")
  4. table.add_column("Board", overflow="fold") # Board _ID and description on separate lines
  5. table.add_column("Variant") # TODO: not a current column
  6. table.add_column("CPU")
  7. table.add_column("Version")
  8. table.add_column("build", justify="right")

Also - is there anything I should take into account wrt to the colors ?

from micropython-stubber.

Josverl avatar Josverl commented on July 24, 2024

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.

scruss avatar scruss commented on July 24, 2024

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.

Josverl avatar Josverl commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.