Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Hide gloss table when all rows are hidden #66

Open
sciepsilon opened this issue Jul 13, 2017 · 2 comments
Open

Hide gloss table when all rows are hidden #66

sciepsilon opened this issue Jul 13, 2017 · 2 comments
Assignees

Comments

@sciepsilon
Copy link
Collaborator

image
In multispeaker documents, users should be able to hide a speaker by hiding all the corresponding gloss rows. Currently, this doesn't work because the speaker label still takes up space on the page even when the corresponding gloss is empty.

@nickatomlin
Copy link
Owner

This seems difficult.

We could hide LabeledSentences which includes the sentence and associated speaker label, but the TimeBlock with timestamps would still exist. And some TimeBlocks might contain utterances from multiple speakers.

@sciepsilon sciepsilon self-assigned this Jul 13, 2017
@sciepsilon
Copy link
Collaborator Author

Actually, do this with speaker checkboxes instead of tier checkboxes.

One possible scheme: Use React state, as follows. LabeledSentences have an attribute "data-speaker" or something. Speaker checkboxes use css to hide/show appropriate sentences. SOMEHOW, labeled sentences find out when they're shown/hidden and update state in their parents accordingly. Each timeblock has an array of the states (shown/hidden) of its children, and when all children are hidden, it hides. Or something.

This feature isn't worth a huge increase in loading time, so tread carefully.

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

No branches or pull requests

2 participants