-
Notifications
You must be signed in to change notification settings - Fork 8
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
Document our design decisions/docs in this repo #170
Comments
Quoting from the slack discussion:
|
There's overlap with the design system. It seems practical to colocate that kind of documentation with the ui codebase. Should we integrate the design system with the ui codebase somehow? Maybe move over docs once they've been implemented? Or move over the entire design system to this repo? Have it function as documentation as well? |
Storybook makes a lot of sense from a development (automated testing is included in the term) perspective, where it is easy to build a component, and its features in isolation in addition to writing unit and e2e tests for those parts. Storybook is no good at being our end-user documentation, which is why we remove the "notes" plugin and stripped down Storybook to the essentials in the first place. Right now we have
Before I went on parental leave @cooper-joe and I discussed this, and we were both in favor of archiving the dhis2/design-system repo and integrating it into dhis2/ui. It went on the backburner because we needed to get ui@5 out first. |
I've been thinking more about how to make this I think there are a number of requirements we can state up front:
Design System ReferenceTo encourage consumers of The reference text would include interactive, live components to illustrate the reference texts. A current design system reference document has a structure for each page (usage, composition, types, options, examples). This structure may need rethinking in a new documentation setup. The current design system has some non-component pages: 'Using the design system', 'Content & Communication', 'Layout...', 'Typography' etc. It may be that these sections need a different treatment, but ideally they will live alongside the component references. Interactive code examplesExamples of each type/variant of the component with accompanying code. Using storybook style 'controls' would allow exploration of all the types/options without needing to create many stories. API referenceUseful to have here, but should not be the only place to find the API. (Issue raised by @varl in an offline discussion: needing to load up a resource-heavy storybook just to reference the API is not great. Should be a lightweight API-reference-only in another location.) I am open to using any kind of platform, storybook or others. I would ideally like to move forward quickly on this to encourage the use of the design system reference and components together. |
I think that if I understand @varl correctly, he wants to move away from using storybook for user facing documentation. I would be in favor of that as well. From a maintenance perspective, storybook has been a lot of work to keep up to date. It's the one thing in our lib that breaks a lot during upgrades, and I've personally found it the hardest to fix as well.
Maybe we should elaborate on this in a separate issue? It seems like there is still a lot of room for interpretation. How do we imagine this workflow to work, etc. I think it makes sense to split what has been mentioned so far in
As for the
Let me know what you think, if anything is missing, incorrect, etc. |
I'd mention purpose of the library in the introduction, other than that 👍 🎉 |
Great write-up @ismay. I had some clarifications/additional comments, which led me to some conceptual questions about how we want to present this library. In requirements:
I'd expand on what we mean by purpose here. I'd like to cover not only the purpose of the component, but it's guidelines for usage, when it should not be used, how to use effectively, and so on. In structure:
Just to note that this section could possibly expand. I'd like to include 'patterns' for common actions, such as 'how to present the user with edit mode' or 'how to display a step by step form'. These patterns do not fall into the component sections, nor do they belong in 'code recipes' that are included below. I think the most appropriate place would be as a subsection of this design system. However, I'm wondering if it is wise to create this difference between the design system and the library... Design System, or
|
First and foremost I am in favor of having a holistic approach to the docs. We've tried out some plugins in the past that were pretty bad. I didn't know about MDX when I made the comment, so it is something to consider. It does look like what I had in mind from a presentation perspective. I was thinking of going the other direction and integrating components and user docs into the "other" docs (ui.dhis2.nu) but maybe the other direction is better? To me it's an open question. |
@cooper-joe That does tie the documentation together nicely. Your suggestions sound very good to me. One thing that it does make me wonder is whether we should consider the entire ecosystem of our frontend libs in this planning process. Since the documentation topic 'designing and building dhis2 apps' will likely also involve libs of ours that live outside of UI. Should we draft a separate plan for docs that are dhis2-wide (frontend), so that we can see which would make sense on a UI level, and which should span our entire ecosystem? Otherwise I can imagine we could run into discussions about whether what's currently documented in the UI docs actually concerns the entire dhis2 library ecosystem, or vice-versa. @varl I see. I don't have any strong preferences either. I ran into issues with storybook, but I can't say it's much more than me being slightly annoyed with it. I'm fine with either. Maybe it's possible to finalize the intended doc structure and requirements irrespective of tech., and then see what seems like the best technical solution to address those? |
I agree. Figuring out the doc structure that we want should drive what tech we use, not the other way around. I've tried to integrate using raw React components into Docsify (our other doc framework), and while it is doable, it also has some annoyances. I used to think they were less than Storybook -- but with MDX maybe it works better? One thing I do think is a must have is using the actual components everywhere in the documentation over e.g. using images of a Button. |
Good point @ismay. The content inside 'Designing and building DHIS2 applications' could be more suited to a high level overview. This section, for example, is a very brief introduction to the user research/planning/design phase. This doesn't necessarily belong in the I agree that drafting a plan for DHIS2-wide frontend documentation system would be a good idea, though I do want to ensure we do not spend too much time trying to plan the perfect system. The documentation will evolve over time (as it is doing right now), so I think identifying the missing pieces now and getting those patched up is my priority. The highest priority missing piece, from my perspective, is the missing link between |
@cooper-joe Yeah I agree, that sounds pragmatic. We could always move documentation around afterwards. So we could just concern ourselves with the ui docs for the moment. And then after that, once we've finished the ui docs, discuss the docs on a higher level. Should we do that? So I guess then we only need to agree on the requirements and structure as outlined above? I'm ok with going ahead with what we've specified so far. |
Hi all - I haven't read this entire thread yet, it's quite hefty, but want to add a few thoughts off the bat:
I would need a lot of convincing to standardize on Storybook as our tool for ALL frontend libs, guides, tutorials, etc. and so I am strongly in favor of a solution that allows us to embed executable code samples and component demos in other places, and deprecating storybook (for documentation) |
Thanks for the links here, @amcgee. I see that I have missed and/or forgotten about a lot of prior context. For example, I forgot that MDX is standalone and not a Storybook specific thing. 🤦 |
See this thread: https://dhis2.slack.com/archives/CBM8LNEQM/p1592406496111500
It would be good to clearly document the design decisions for the components in this repo. That way maintainers and users know the intention of the components. It allows us to clearly establish what can be considered a bug, and how a component is meant to be used.
The text was updated successfully, but these errors were encountered: