Closed tucotuco closed 1 year ago
Would this be acceptable:
Test CSS: add class example
to last tr
element, with styling:
.example code {
padding: 0.2rem 0.4rem;
background-color: #FCF5F9;
border-radius: 0.2rem;
}
.example code a {
color: #d63384; /* Make sure that links keep the code color */
}
I think that looks ok. Just one question/thought: did you include leading and ending spaces around the example value? It looks that way, but I think the more common writing convention would be not to include the spaces around the value, and use ", " (comma space) as the separator in the list of examples.
On Thu, Apr 20, 2023 at 8:07 AM Peter Desmet @.***> wrote:
Would this be acceptable:
[image: Screenshot 2023-04-20 at 17 06 14] https://user-images.githubusercontent.com/600993/233408276-f39be6c7-1ffa-4c21-af61-4ae5f8386fff.png
— Reply to this email directly, view it on GitHub https://github.com/tdwg/dwc/issues/442#issuecomment-1516499137, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKZUDPJF7M5K6NW5LNHFATXCFGJXANCNFSM6AAAAAAXENCD3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>
No, there are no leading/ending spaces. The examples are separated by “ , “. I added some natural padding so the highlight color doesn’t stick to the letters. Anyone copying the example would not get spaces around it.
In the longer run, I think every new example should get a new line, but that requires updates in the source csv files.
every new example should get a new line
I second that.
One thing we need to consider is that the metadata expressed here is really just a formatted representation of the authoritative metadata for the terms. We have made an effort to ensure that every user who encounters term metadata about a term from any source sees the same thing. That includes the Quick Reference Guide, the List of Terms document (the reference document included in the standard), and RDF metadata made available in several forms (RDF/XML and Turtle). Thus introducing formatting information in the source CSV files will proliferate into all of these serializations. Embedding newline characters may make reading the examples better in the Quick Reference Guide, but it would be a confusing mess for someone who harvested the data as values of RDF triples and it also is messy for people who edit the CSVs by hand (which they do).
We had a discussion about this kind of thing in the Humboldt Extension Task Group and the conclusion was that when examples get complicated to the level where they can't easily be viewed as a single line of text, they need to be pulled out into a user guide or "recipes" document rather than introducing complexity into the standard term metadata fields.
@baskaufs I agree.
Now, if we were using JSON/XML as our source format, we could just list the examples as an array. In CSV, we're more limited. That said, we can use a more consistent separator for individual examples. We currently use ,
, ;
and sentences ending in a .
to separate examples. Sometimes it's even mixed.
Looking in the source files, ;
(semicolon+space) would be a very good candidate to separate examples. Across all versions of DwC is currently used 3 times and only to separate examples (here and here). It's not going to mess up RDF (like \n
might) and we don't recommend it as a separator in examples (we use |
for that).
@peterdesmet This solution looks very reasonable to me.
@tucotuco I assume you mean the solution using ;
? Which could then result in examples being shown on a new line? Not the intermediate styling fix suggested in my first comment?
I like the semicolon solution. If semicolons aren't used anywhere else in the term metadata text, it could be used as a formatting clue (similar to the way that backticks are used to indicate codeblock text) for building web pages while still being understandable in a text-only context. I think it also makes sense from the standpoint of how a semicolon is used in English text, so it would be interpreted correctly by someone who wasn't familiar with our formatting conventions.
Yes, I meant the semi-colon (;) as example separator solution.
@tucotuco @baskaufs Would you be willing to change this in the source files? Would this require a version update?
I don't think these changes require term version changes. Does that seem right to you @baskaufs ?
If it's only styling, I think that is correct.
It's only for styling, term_versions.csv would be updated to make use of ;
.
I've created a pull request with term_versions.csv changes and the deployment of those using build.py. Hoping it is just this easy.
When the current public comment period is over, let's make sure that the semicolons get added to the CSV file in rs.tdwg.org, otherwise this change will probably be overwritten when the changes flow through the pipeline.
The change was implemented in #443. Here's a before and after:
Note: I did not implement the change I suggested earlier and <code>
will keep the original styling, making it consistent with other TDWG sites and <code>
shown inline with text.
One example that brought attention to the Material Sample Task Group is https://dwc.tdwg.org/terms/#dwc:preparations.
What is red currently used to be highlighted, making example boundaries easier to recognize.