Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Swipe mode/persistent cols edge case prevents swiping #37

Closed
peterwilsoncc opened this issue Sep 22, 2014 · 2 comments
Closed

Swipe mode/persistent cols edge case prevents swiping #37

peterwilsoncc opened this issue Sep 22, 2014 · 2 comments
Assignees
Labels

Comments

@peterwilsoncc
Copy link
Contributor

In swipe mode, if the screen is only wide enough to fit persistent columns, there is no way of navigating to the other cells.

In this circumstance, the persistent setting could be ignored to allow navigation. A priority option could be introduced to allow for multiple persistent columns; the highest priority would be hidden last.

Reduced test case: http://jsbin.com/buwoc/1/edit?html,output
Narrow the output window until only the address can be seen, you will not be able to navigate to the other property details.

@zachleat zachleat added the bug label Oct 23, 2014
@zachleat
Copy link
Member

zachleat commented Dec 5, 2014

This should be working fine now. Note that for this to work correctly in your example, you’ll want to remove the   from all of your table whitespace. We want the rows to flow or things get funky.

@zachleat zachleat self-assigned this Dec 5, 2014
@peterwilsoncc
Copy link
Contributor Author

I've created an alternative solution in the branch https://github.com/peterwilsoncc/tablesaw/tree/issues37v2

In the current solution, the persist setting is respected and can cause an overflow on small screens.

In my alternative solution, the persist setting is ignored in the edge case to prevent overflow from occurring.

There's a quick screen cast to demo it at http://youtu.be/B1vZAukL7c8

My alteration requires looping through header cells a second time, so may have efficiency issues. Changes are:

  • fakeBreakpoints - second loop for ignoring persistent cols
  • new variable for setting the mode to respect/disrespect the setting
  • getNext, advance, canAdvance methods check mode before selecting the appropriate set of headers.

Issues as I see it are:

  • efficiency of second loop
  • is this solution valid: hiding all columns in financial reports may have legal implications
  • usability

P

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants