Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatting of glossed examples #80

Open
HedvigS opened this issue Apr 11, 2024 · 13 comments
Open

formatting of glossed examples #80

HedvigS opened this issue Apr 11, 2024 · 13 comments

Comments

@HedvigS
Copy link
Collaborator

HedvigS commented Apr 11, 2024

As I asked people re wiki publishing, Alena pointed out that there is a discrepancy between how the glossed examples are rendered between the github wiki markdown and the clld web app pages per feature, specifically in terms of aligning the forms.

clld web app
Screenshot 2024-04-11 at 11 14 45

Github wiki article
Screenshot 2024-04-11 at 11 15 15

Is that something that is an easy fix or would it be very cumbersome to figure out how to render the alignment on the clld web app?

@xrotwang
Copy link
Member

My prefered fix for this would be moving to CLDF Markdown for the feature descriptions - i.e. adding the examples as ExampleTable to the CLDF dataset and only referencing them from the wiki pages. Then, the regular example display of clld apps could be used, e.g. https://apics-online.info/sentences/72-64

@HedvigS
Copy link
Collaborator Author

HedvigS commented Apr 11, 2024

Hm, okay. Is there a way to do this automagically?

@xrotwang
Copy link
Member

Maybe a rough first pass. Manual inspection/correction would almost certainly be necessary.

@HedvigS
Copy link
Collaborator Author

HedvigS commented Apr 11, 2024

Maybe a rough first pass. Manual inspection/correction would almost certainly be necessary.

I think that could work. A first pass would save a lot of time.

@xrotwang
Copy link
Member

@johenglisch do you want to have a go?

@johenglisch
Copy link
Contributor

Yeah, I'll take a look at this

@johenglisch
Copy link
Contributor

I'm a bit out of the loop with how people use the wiki so I might be wrong, but I have trouble seeing how CLDF Markdown would fit in here.

The way I understood it CLDF Markdown relies on a separate rendering step which resolves links into the CLDF data. But separate rendering steps don't really gel well with editable wikis:

  • If we put the CLDF Markdown mark-up directly on the wiki, Github will just show a bunch of broken links.
  • If we generate the wiki pages from separate files, we would overwrite any manual changes that people added.
  • If we disallow manual edits and redirect people to a bunch of ‘source’ files then changing wiki pages becomes more complex and bureaucratic and I'm not sure that's a good idea.

What am I missing?

@xrotwang
Copy link
Member

The only viable option is the first one. I.e. examples go into a CLDF ExampleTable and are only referenced in the wiki pages. This assumes that there won't be too much editing of examples in the future. The "just a bunch of broken links" thing can be turned into a feature if the link label - i.e. the part that goes into [...] is used to extract what's essential about an example, or just for any mnemonic hint on what's in the example.

@HedvigS
Copy link
Collaborator Author

HedvigS commented May 13, 2024

If you think it's worth it then sure, but to me it seems a little like overkill.

You are sure there is no way of enabling the kind of github flavoured markdown that works in the wiki with the way the clldf-web app makes the feature pages?

@HedvigS
Copy link
Collaborator Author

HedvigS commented May 13, 2024

We could remake the examples into proper markdown tables? Is that a viable other option?

@xrotwang
Copy link
Member

As I said, I think spending any effort on this would only be worth it - from my point of view - if we thereby make the examples available as proper structured data in CLDF. If @johenglisch thinks tweaking the clld app is easy - he can go for it. Rewriting examples into markdown tables seems overkill to me - that would require a lot of editing. If you go that way, make sure to test with one example first. Rendering markdown tables into an HTML page that has all sorts of CSS attached to it might have unintended side effects.

@johenglisch
Copy link
Contributor

There's a lot going on right now, so I just opted to fix the rendering bug on the web app side for now. Unless this really urgent (i.e. must be done this week), I'd say we can revisit this later.

johenglisch added a commit that referenced this issue May 15, 2024
… (#81)

* fix mangled indentation in source blocks coming from markdown (cf. #80)

* exception on landing page

(might have been because I was running sqlalchemy 2 by accident but can't
hurt to fix anyways)

* linter complained about blackslashes

* couldn't populate database due to undeclared dependencies
@HedvigS
Copy link
Collaborator Author

HedvigS commented May 15, 2024

There's a lot going on right now, so I just opted to fix the rendering bug on the web app side for now. Unless this really urgent (i.e. must be done this week), I'd say we can revisit this later.

I appreciate you doing all of this. It's not urgent, we're not pushing to web until give the go ahead in relation to paper publication.

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

No branches or pull requests

3 participants