Giter Site home page Giter Site logo

documentation issues about textual HOT 4 OPEN

hydrargyrum avatar hydrargyrum commented on July 17, 2024
documentation issues

from textual.

Comments (4)

merriam avatar merriam commented on July 17, 2024

You might get faster answers in the discord.

Keys are listed in keys.py, which is both all the listed keys and their textual representation.

I'm unclear on the third part of your question. Are you asking about how the BINDINGS variable is processed?

from textual.

merriam avatar merriam commented on July 17, 2024

Sorry, my comment looks terse in retrospect. No emoji anywhere~ 😸

You are suggesting a line n the Guide/Input Bindings section could point to keys.py? Also, removing the paragraph mentioning the Binding Class as the class does not provide more options?

from textual.

hydrargyrum avatar hydrargyrum commented on July 17, 2024

Keys are listed in keys.py, which is both all the listed keys and their textual representation.

Of course, but I think a library's documentation's role is to avoid having to read the library's source code!

You are suggesting a line n the Guide/Input Bindings section could point to keys.py?

Not merely point to keys.py, include all the enum keys in the documentation, see for example https://doc.qt.io/qt-6/qt.html#Key-enum

for classes, the module to import them from is not indicated, for example, on https://textual.textualize.io/api/binding/ textual.binding.Binding is not mentioned anywhere

The problem is similar, of course I could grep Binding in textual's source code, and see in what file it's present, then import from that file. But I think the documentation could also simply mention that information so the documentation is enough in itself.

There are some projects where there's very little documentation, and by reading it, it's obvious you'll very soon have to read not only the docs but also the source code. By contrast, textual's docs cover many topics, from different point of views (e.g. tutorial, guide, reference, API), it's pretty good, but then its quality makes expect that I don't have to read the source code! ;)

I'm unclear on the third part of your question. Are you asking about how the BINDINGS variable is processed?

Not exactly, for BINDINGS/Binding(), one can use Keys.Left constant, but it's also possible to use "left" string. This should be explicit, and a bit more exhaustive:

  • list all Keys enum entries (since the list is finite)
  • describe how the string to pass is built, for example Ctrl+A should be passed as the string "ctrl-a" which is not obvious without documentation telling it

from textual.

darrenburns avatar darrenburns commented on July 17, 2024

I agree that modules listed in the reference should include the path of the module.

The title of the API reference for textual.binding is Binding, which confusingly is also the name of a class inside textual.binding.

I think the title of API reference pages for modules should just be the module path, so textual.binding - anything else is pretty confusing.

from textual.

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.