question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add architecture documentation of controls

See original GitHub issue

Proposal: Add architecture documentation of controls

Summary

Currently there is a lot of documentation on how to use controls, however there is little to no documentation on how a control works, making it harder to fix bugs and contribute to controls. We should add documentation (e.g. a README.md) to controls which explain how the control works internally.

Status of controls

Control Status
NavigationVIew Finished
ColorPicker @robloo is working on this control

Rationale

  • Complex controls are huge code bases and not easy to navigate through making it hard to fix bugs
  • People who are unfamiliar with a control’s code base can be overwhelmed when trying to contribute, especially with complex controls such as NavigationView or ItemsRepeater

Scope

Capability Priority
Add documentation on the internal architecture of controls Must
Explain common “flows” inside a control (e.g. selecting an item inside NavigationView) Should

Important Notes

A possible documentation “template” could be:

# NavigationView

The NavigationView ...

## Architecture

NavigationView consists of ItemsRepeaters renderin NavigationViewItems.
Every NavigationViewItem notifies the NavigationView whether it got invoked or selected. The NavigationView stores the selection model and informs NavigationViewItems when they got selected.

## Common flows

### Event flows

#### NavigationViewItemInvoked
1. NavigationViewItem gets invoked
2. NavigationView get's informed that an item was invoked
3. NavigationView raises ItemInvoked
4. NavigationView updates selection
5. NavigationView notifies the invoked NavigationViewItem about it's new selection state
6. NavigationView raises SelectionChanged


### UIA flows

#### SelectedItem
...

Ideally we would have this in every control’s folder however for multiple controls, there won’t be much to point out (e.g. SplitButton which essentially only has one flow). In “special cases”, e.g. the CommonStyles project, the README would explain what the “CommonStyles” project is for.

Open Questions/Issues

This would require a lot of “initial” work as this needs to be written first. I would like to help with that if we deem that this is good in the long run.

When a control’s API changes in a lot of cases, these documents need to be updated.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
ranjeshjcommented, Jul 2, 2020

@MikeHillberg @chigy @StephenLPeters as FYI. We currently have the specs repo and the docs site but I think this makes sense in the repo next to the code - would you agree ?

1reaction
chingucodingcommented, Jul 23, 2020

All right, I’ll start working on the NavigationView documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documenting Software Architecture in Code Repository
This solution offers a high quality, manageable, version controlled and traceable architectural documentation.
Read more >
Creating and Using Software Architecture Documentation ...
This report describes the design for a documentation system that supports capturing software architecture as a Web-based, database-backed, ...
Read more >
Software Architecture Documentation: Quick start guide
Architecture Design Decision (ADD): This document outlines strategic, expensive, critical, large-scale, or risky architectural decisions, along ...
Read more >
Example: Software Architecture Document
This document presents the architecture as a series of views; use case view, logical view, process view and deployment view. There is no...
Read more >
Architecture Decision Record (ADR)
An architecture decision record (ADR) is a document that captures an important architectural decision made along with its context and consequences.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found