Text elements #1805
Replies: 2 comments 2 replies
-
Thanks for the feature request, @ed2050! We strongly tend towards option 1 instead of creating a mighty text element with lots of parameters. Since we try to avoid abbreviations, Driven by another discussion (#1592 (comment)) I recently started to think about a If we introduce more specialized text elements, we could imagine to deprecate Regarding the headings we're thinking about more LaTeX-like names What about something like this:
Either way, our new text elements could have
What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi falko, thanks for the info. I agree, TOC would be useful. Before addressing your other questions, can I ask who your intended audience for nicegui is? I thought it was a toolkit to simplify user interfaces for app developers (whether web app or local app or both). These people would be programmers who are comfortable using python, not beginning students or people whose main job is another field and just dabble in python as a support tool (eg scientists running python scripts to parse / validate data from their experiments). When you suggest latex and heading / subheading / subsubheading it sounds like you are targeting a very different audience. Like you are aiming nicegui at academics, particularly in cs or math, physics, and other hard sciences. Those are the people who know latex. Heading / subheading / subsubheading is more suitable for authoring scholarly publications than for writing web apps. Anyone making web apps needs to understand basic html. HTML knowledge is far, far more common than latex knowledge among a general programming audience (I know both, though I haven't used latex since grad school). If your target is "python developers" then I would stick with paragraph, heading levels 1-6, and other html tags. They will be more familiar to a wider audience. As far as deeper structures - TOCs, chapter, part, etc - html does have those. So I'm not sure where the resistance to html comes from. It's the lingua franca of markup languages (maybe markdown has slightly higher recognition among non-technical audiences). There are millions and millions of web developers, vs how many latex users? I love latex, it handles publishing jobs very well. But it doesn't seem like the right model for interactive web-based apps. What do you think? What's your intent? Maybe we have different audiences in mind. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Continuing from discussion #1778, nicegui could use more text elements. ui.label is confusing because html has a
<label>
tag, which ui.label is not. I suggest eitherui.para ()
andui.heading (level = 1-6)
orui.text ()
that covers all text elements. It can have flags such asheading = 1-6
for header text, para = true/false for body text, etc. Or perhaps an all-encompassing flagtype = para,label,heading1,heading2,...
that allows for later expansion. If users want simplicity, they can just callui.text ()
with no flags to get the default text element, whatever that may be. Maintain ui.label as deprecated for compatability with existing code.Beta Was this translation helpful? Give feedback.
All reactions