pombase / canto

The PomBase community curation tool
https://curation.pombase.org
Other
19 stars 7 forks source link

formatting oddity #1594

Open ValWood opened 6 years ago

ValWood commented 6 years ago

not important but I thought this was weird? that it sometimes line wraps and sometimes doesn't?

weird

jseager7 commented 6 years ago

Yes, that's odd. Could you provide a link to the curation session, so I can check whether this issue is specific to certain browsers?

ValWood commented 6 years ago

in https://curation.pombase.org/pombe/curs/3d43cf9a14d68a43 (I'm using Chrome)

jseager7 commented 6 years ago

I've just checked in my browser, also on Chrome, and none of the cells are wrapping for me.

I suspect the issue is due to differences in operating system: the styling rules for Canto are designed such that if you're on macOS you'll probably see the Helvetica Neue font, whereas Windows users are going to see Arial.

I reckon this is the cause because I can re-create the wrapping issue by switching to a monospace font:

background_font_wrapping

The other aspect of the problem is the fact that there's some internal padding (3 pixels) on the table cells, and I guess the styling isn't smart enough to expand the table to accommodate it. If I manually disable the padding, then the wrapping goes away:

background_no_pad_no_wrap

One other thing is that the backgrounds use hyphens, and the browser probably thinks it's fine to wrap the text whenever it sees a hyphen.

@kimrutherford There's a few solutions I can think of, but most of them probably require more effort than it's worth:

  1. Disable text-wrapping on the background column with white-space:nowrap or similar;

  2. Replace hyphens with a non-breaking hyphen (‑), but maybe only when rendering out to this view;

  3. Rely on a web font instead of installed fonts, so that there's a better chance of font rendering being consistent across browsers;

  4. Force the table cells to scale to the padding of their contents, rather than the other way around (where contents are forced to fit the internal padding of the cell). I have no idea if that's even possible though.

kimrutherford commented 6 years ago

It renders nicely in Firefox which will be why I haven't noticed it.

There's a few solutions I can think of, but most of them probably require more effort than it's worth:

There are a few open issues about allele and genotype formatting. I think we should hold off on all of them for now. I'd like to get back to this at some point though.

I agree with the "low priority" label.

ValWood commented 5 years ago

2. Replace hyphens with a non-breaking hyphen in alleles and genotypes sound a sensible thing to do generally?

kimrutherford commented 5 years ago
  1. Replace hyphens with a non-breaking hyphen in alleles and genotypes sound a sensible thing to do generally?

It's a juggling act. If we do that there will be more cases when the table is wider than the screen.

ValWood commented 5 years ago

Sorry I should qualify that. I mean only in allele or genotype name, not description. I didn't think any of the names would be so long? Is there a way to check this?

kimrutherford commented 5 years ago

Here are the 40 longest allele name according to Chado:

glutamine rich domain and polybasic C terminus wis1-deletion of N-terminal regulatory domain SAP motif deleted & C-terminal truncation deletion of N-terminal regulatory domain disrupted mitochondrial localization scr1-S235A,S332A,S333A,S408A,S410A delta-Nterminal regulatory domain transmembrane-like domain deleted deltaN-terminal extension domain M26 promoter binding site mutant rad3-S1901A,S1945A,S1976A,T2045A prt2-HomoID-like sequence mutant C-terminal PEST sequence deleted tea4delta-expressing-pcp89-tea4 tea4delta-expressing-tea4N-cdr2 rad26-T32A,S39A,S62A,S72A,S444A C-terminal receiver like domain R19A,L22A,V26A,N23A,R147A,P150A 1 bp insertion in 5'-UTR (uORF) Coiled coil and C-term 751-1076 GATA promoter mutant CYC1-lacZ pcn1-HA-Ub-L8A,I44A-PCNA-K164R Kinase ATP binding site mutant Cdc17(1-175/M20A/deltaNLS)-GFP ter1-delta(25-1135)::ura4+-tk pombe-specific region deleted rad17-S245A,S326A,S422A,S439A ste7-delta/ste7-delta diploid K123-14D,heterozygous_diploid ste11-T173A,S218A,T305D,T317D C-terminal truncation 287-483 C-terminal truncation 429-483 K25R,K121R,K126R,K156R,K175R mrc1-S572C,S599C,S604C,S614C mrc1-S572A,S599A,S604A,S614A bqt4-delta N-terminal domain P41nmt1-TAP-Mmi1-(1-65)delta dis2-K379A,V381A,F383A,G367V delta-coiled coil and C-term dis2-G367V,K379A,V381A,F383A

ValWood commented 5 years ago

some of these aren't really necessary though... and are more like free text descriptions than "names", if they aren't names they should be included...

bqt4-delta N-terminal domain -> bqt4-deltaN SAP motif deleted & C-terminal truncation deletion of N-terminal regulatory domain >xxx-deltaN disrupted mitochondrial localization ?????? this is a phenotype???? delta-Nterminal regulatory domain > xxx-deltaN transmembrane-like domain deleted deltaN-terminal extension domain C-terminal PEST sequence deleted -> xxx-deltaPEST

these are confusing too tea4delta-expressing-pcp89-tea4 tea4delta-expressing-tea4N-cdr2

we should have standard naming conventions for these.....

but OK, let's keep line wrapping as it is for now and close this...

kimrutherford commented 5 years ago

some of these aren't really necessary though... and are more like free text descriptions than "names", if they aren't names they should be included...

Some of them did look a bit odd to me. If it would help I could make a similar list that includes gene IDs and session IDs.

ValWood commented 5 years ago

Yes, if you can put that list on the curation tracker, with the session IDs, we will review it some time