GithubHelp home page GithubHelp logo

Comments (2)

matt-dray avatar matt-dray commented on June 13, 2024

At least in the first instance, hyperlinks to the web and email (i.e. mailto:) should be supported on the cover page (made easier by #102). It may make sense to support hyperlinks in pre-table metadata when linking to a web-based source, or if there's some arbitrary pre-table metadata that requires it (#74), whatever that may be. Internal hyperlinks could also be used in the case of linking to each tab from the contents tab (i.e. the 'Sheet name' column).

from a11ytables.

matt-dray avatar matt-dray commented on June 13, 2024

My expectation is that we should automatically add hyperlinks for users to the contents page, which would amount to either (a) inserting some markup that gets converted later to a hyperlink in generate_workbook(), or (b) just handled entirely by generate_workbook() (regardless of approach, there would probably need to be a logical argument or option to turn this on and off).

There's some slight awkwardness with this, though.

Let's say the user provides this to the tables of create_a11ytable() for the contents page:

contents_df <- tibble::tribble(
  ~"Sheet name", ~"Sheet title",
  "Notes", "Notes",
  "Table_1", "Example sheet title"
)

Which generates:

Sheet name Sheet title
Notes Notes
Table_1 Example sheet title

If we want to auto-internal-hyperlink each sheet name in this table to the relevant sheet, then we can. But that assumes that the string in the 'Sheet name' column actually matches the name of the relevant column according to the a11ytables object, but the user could have supplied something slight different names.

Could handle this by warning the user if there's a mismatch? Or maybe just generate the contents page for the user automatically (#75) and handle all this on behalf of the user. Or the user has to specify a markdown link, which maybe looks like:

contents_df <- tibble::tribble(
  ~"Sheet name", ~"Sheet title",
  "[Notes](Notes!A1)", "Notes",
  "[Table_1](Table_1!A1)", "Example sheet title"
)

This is because the cell will ultimately be converted to =HYPERLINK(#Notes!A1). But then we'd need to expect users to know this esoteric sheet-name-bang-cell-reference hyperlink format. Could just ask them to supply only the appropriate sheet or tab name in the parentheses, but we may well need that cell reference later if we end up allowing multiple tables per sheet; it won't always be cell A1 that the hyperlink should link to.

from a11ytables.

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.