FirstLegoLeague / fllscoring

FLL Scoring app. See Demo:
http://firstlegoleague.github.io/fllscoring/
GNU General Public License v2.0
14 stars 19 forks source link

HTML in mission def #88

Open rikkertkoppes opened 9 years ago

rikkertkoppes commented 9 years ago

I am not overly joyful about html embedded in the Challenge definition, since this requires every consumer to be HTML aware.

Since we cannot know what consumers may be created (by us or by others), this is quite a design restriction to make.

Propose to do something more neutral. CDATA is ok, we want to preserve line endings. Maybe use markdown for it, we basically only use lists, bold, italic etc anyway.

@robvw @kmeesters what do you think?

kmeesters commented 9 years ago

I'm okay with that to, we don't need full HTML. But as you can see my goal was to create this:

Required Conditions visible at the end of the match:

Required methods, constraints:

rikkertkoppes commented 9 years ago

Ok, can you change it to markdown (make sure line endings are ok)?

I'd remove the bold annotation, but i'll leave that up to you.

I will add a markdown directive in the application for the mission description, either:

Maybe not this week, depends on my health

kmeesters commented 9 years ago

No rush, just to verify: what is the right way to do line endings?

rikkertkoppes commented 9 years ago

Just type them. Markdown relies heavily on line endings and whitespace. While xml ignores them except in cdata.

The xml now contains single lines for every description. You'll need to take the above into account while formatting xml for example.

robvw commented 9 years ago

Are you sure using Markdown is easier than (potentially a restricted subset of) HTML? Especially in this day and age: a large part of consumers will likely target a browser, so HTML will simply work, even if they never actually think about it.

Given the definitions themselves are in XML, using a "similar" language for markup seems acceptable. If somebody has to learn XML in order to write a challenge description, I bet their learning curve will be lower if the (granted, optional) markup is in HTML than if it uses markdown.

Besides, there's no requirement to actually do anything with the markup; if a consumer feels like simply stripping the tags, that's fine with me (not optimal, but very much workable). While there's ready-made striptags() in many languages, I don't think I've ever seen a stripmarkdown() equivalent. Even though I'm aware the goal of Markdown is to degrade gracefully (if you don't support Markdown, just output as-is), we should consider our target audience; the following looks * italic * and * bold * to you and me, but to the average person... I'm not so sure, they might very well think it confusing.

Not saying I'm right, just sharing my two cents for consideration.

rikkertkoppes commented 9 years ago

This is not critical for V2

rikkertkoppes commented 9 years ago

Any other thoughts? I'm not quite convinced for either solution. @robvw has a valid point I think, however, target platforms may also be iOS or Android native.

@nickygerritsen @RuudPuts do you have any preferences regarding app development (in general) which may help us making a decision?

For now, I'm keeping it as html