Skip to content

Commit 524dd57

Browse files
committed
feat: add doc files (readme, maintaining, contributing, developing, help) from the previous repo
1 parent 5942242 commit 524dd57

8 files changed

Lines changed: 940 additions & 1 deletion

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: 🐞 Bug Report
2+
description: If you have found a bug, you should chose this template.
3+
labels: bug
4+
body:
5+
- type: checkboxes
6+
attributes:
7+
label: "Decision Table"
8+
description: |
9+
A good amount of bug reports are actually feature requests. To help you with that, read and check all the boxes to make sure you really need to fill the full template. If you can't check those two boxes, this is a feature request, not a bug. Fill a feature request here: https://native-html.canny.io/features
10+
options:
11+
- label: "My issue does not look like “The HTML attribute 'xxx' is ignored” (unless
12+
we claim support for it)"
13+
required: true
14+
- label: "My issue does not look like “The HTML element `<yyy>` is not rendered”"
15+
required: true
16+
validations:
17+
required: true
18+
- type: checkboxes
19+
attributes:
20+
label: "Good Faith Declaration"
21+
description: "We're happy to help, but our time is valuable and we'd like you to make sure you haven't been able to find an answer publicly available."
22+
options:
23+
- label: "I have read the HELP document here: https://git.io/JBi6R"
24+
required: true
25+
- label: "I have read the CONTRIBUTING document here: https://git.io/JJ0Pg"
26+
required: true
27+
- label: "I have confirmed that this bug has not been reported yet"
28+
required: true
29+
validations:
30+
required: true
31+
- type: textarea
32+
attributes:
33+
label: "Description"
34+
placeholder: "Describe the bug. Please provide reproduction steps, screnshots and screencasts when appropriate."
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: React Native Information
40+
render: sh
41+
placeholder: "The result of running `react-native info` or `expo diagnostics`. If you are ready to provide a snack, just type \"confer snack\"."
42+
validations:
43+
required: true
44+
- type: textarea
45+
attributes:
46+
label: "RNRH Version"
47+
placeholder: "Type which version of react-native-render-html you are using."
48+
validations:
49+
required: true
50+
- type: checkboxes
51+
attributes:
52+
label: Tested Platforms
53+
description: Platforms on which you have tested the bug
54+
options:
55+
- label: Android
56+
- label: iOS
57+
- label: Web
58+
- label: MacOS
59+
- label: Windows
60+
validations:
61+
required: true
62+
- type: checkboxes
63+
attributes:
64+
label: Reproduction Platforms
65+
description: Platforms on which you have reproduced the bug
66+
options:
67+
- label: Android
68+
- label: iOS
69+
- label: Web
70+
- label: MacOS
71+
- label: Windows
72+
validations:
73+
required: true
74+
- type: textarea
75+
attributes:
76+
label: Minimal, Reproducible Example
77+
description: |
78+
[*What is a Minimal, Reproducible Example (MRE)?*](https://stackoverflow.com/help/minimal-reproducible-example). Provide either a link to an expo snack, git repository, or a code block. You can fork [**our Snack template**](https://snack.expo.dev/@jsamr/rnrhtml-template) to gain time (follow instructions from the README in this snack)! The MRE **must be self-contained**, and **HTML inlined** unless strictly necessary (e.g., a bug with remote HTML). Also note:
79+
- If your issue is related to operations such as dependency resolution or testing, **you must** provide a MRE in the form of a git repository.
80+
- If and only if you provide a regression test in lieu of a MRE, you can reference the related PR instead.
81+
placeholder: "https://snack.expo.dev/@jsamr/rnrhtml-template"
82+
validations:
83+
required: true
84+
- type: textarea
85+
attributes:
86+
label: Additional Notes
87+
description: "Any extra information that can help with the resolution. If other libraries are involved in the MRE, note their versions here."
88+
validations:
89+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 📝 Feature Requests and Enhancements
4+
url: https://native-html.canny.io/features
5+
about: A page where all feature requests are handled.
6+
- name: 🆘 Getting Help
7+
url: https://github.com/meliorence/react-native-render-html/blob/master/HELP.adoc
8+
about: A resource which describes all the steps you should go through when you're facing an issue with this library.
9+
- name: 🌐 Official Website
10+
url: https://meliorence.github.io/react-native-render-html/
11+
about: The official website with plenty of guides, blog posts and documentation!

CONTRIBUTING.adoc

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
:hide-uri-scheme:
2+
ifdef::env-github[]
3+
:tip-caption: :bulb:
4+
:note-caption: :information_source:
5+
:important-caption: :heavy_exclamation_mark:
6+
:caution-caption: :fire:
7+
:warning-caption: :warning:
8+
endif::[]
9+
:toc:
10+
11+
:rnrh-test-folder: https://github.com/native-html/core/tree/master/packages/render-html/src/__tests__
12+
13+
= A Contributors' Guide
14+
15+
[NOTE]
16+
If you're starting to read this guide, well thanks for willing to contribute to
17+
this project! Your effort will be very much appreciated.
18+
*If you need help*, take a look at <<HELP.adoc#,our dedicated document>>.
19+
20+
[[tickets]]
21+
== Opening Tickets
22+
23+
After you've read the relevant sections of this document, you can open a ticket
24+
through GitHub here:
25+
https://github.com/native-html/core/issues/new/choose. Make
26+
sure you follow the appropriate template.
27+
28+
[NOTE]
29+
The art of filling good reports is as important and valued as the art of
30+
producing readable, maintainable code. Developers tend to rush when filling
31+
reports because their initiative stems from a place of frustration. This is
32+
very well understandable, but ineffective regarding the goal of solving one's
33+
problem. Consider the __time investment / benefits__ ratio: by filling a detailed
34+
bug report, you might have committed a chunk of your
35+
valuable time. But **your chances of having a fix merged rapidly have considerably
36+
increased**.
37+
38+
[WARNING]
39+
By not following our guidelines and templates, you risk having your ticket
40+
closed without notice. Sorry about that... our time is also valuable, and we
41+
cannot help you if you don't help us in the process!
42+
43+
=== Submitting a Bug
44+
45+
[CAUTION]
46+
If you would like to report a problem, take a look around and see if someone
47+
already opened an issue about it (see <<HELP.adoc#,HELP>> document). If you a
48+
are certain this is a new, unreported bug, you can submit a bug report
49+
https://github.com/native-html/core/issues/new/choose[by
50+
opening a new issue].
51+
52+
The most important quality of your bug report is *reproducibility*. It means we
53+
can easily reproduce and investigate the bug to fix it as quickly as possible.
54+
If you've never heard of a “minimal reproducible example”, take a look at this
55+
guide: https://stackoverflow.com/help/mcve. Bellow is a table of different
56+
types of reproductions:
57+
58+
[TIP]
59+
If you add screencasts, screenshots, debugging information, or any insights
60+
that can help us identify the failure as quickly as possible, you can consider
61+
each a bonus :zap:.
62+
63+
[cols=3*,options=header,frame=topbot]
64+
|===
65+
|Reproduction
66+
|Efficiency
67+
|Information
68+
69+
|Regression Test
70+
|:zap::zap::zap::zap:
71+
|Offering a PR with a Test which reproduces the issue is the most efficient way
72+
to have your bug fixed rapidly. More details on the *<<bug-repro,dedicated
73+
section>>*. You are still required to open a bug report ticket, but you will be able
74+
to skip many steps.
75+
76+
|Snack
77+
|:zap::zap::zap:
78+
|A *Snack* is very convenient for you and for us. You can
79+
https://snack.expo.io/@jsamr/rnrhtml-template[*start from
80+
our template*]. *Make sure you set the appropriate version of this library.*
81+
82+
|Git
83+
|:zap::zap::zap:
84+
|A Git reproduction is as efficient as a Snack, albeit it might be a little
85+
extra work for you.
86+
87+
|Code Snippet
88+
|:zap:
89+
|A snippet is better than nothing, but we don't consider it __high quality__
90+
and might take more time to investigate. Please consider put your snippet into
91+
a *Snack*. I will take you 2 minutes to configure.
92+
|===
93+
94+
Second important thing: try-out the latest version, including pre-releases! For
95+
more information on this topic, read the
96+
https://github.com/native-html/core#versions[Versions section
97+
of the README]. If you can try `master` branch, that would be even better, but
98+
we don't require it because it could contain breaking changes. To do
99+
so, simply run the following command:
100+
101+
```bash
102+
npm install "github:native-html/core#master"
103+
```
104+
105+
[[features]]
106+
=== Proposing a Feature or Enhancement
107+
108+
* Feature requests and enhancements **must** be submitted https://native-html.canny.io/features[in our Canny feature tracker].
109+
* You can, *in addition*, consider <<rfc,writing an RFC>> and offering it as a PR.
110+
111+
[TIP]
112+
You or your company need a feature? Consider https://github.com/sponsors/jsamr[sponsorship or consultancy] and it will be delivered ASAP.
113+
114+
== Pull Requests
115+
116+
[NOTE]
117+
We require some criterion to accept a pull request. But don't worry, we're also
118+
willing to help. You're encouraged to start a
119+
https://github.blog/2019-02-14-introducing-draft-pull-requests/[Github draft]
120+
and we will be glad to help you build it and make it comply with our
121+
requirements. If you have any question or need advise regarding your
122+
contribution, you can also ping us in our https://discord.gg/MwrZmBb[Discord
123+
#contributing channel].
124+
125+
=== Bug Fixes
126+
127+
If your PR fixes a bug, you are required to implement a regression test to
128+
prove your fix is effective, but *don't worry, we will help you*. The simplest
129+
way is to look at {rnrh-test-folder}[our test folder] and copy/paste an existing __regression
130+
test__ to get inspiration. You are also advised to read our <<DEVELOPING.adoc#, developing guide>>. If you know what the test should do, but don't
131+
know how to implement the test, you can add a "Testing Plan" section in the
132+
body of your PR.
133+
134+
135+
[[bug-repro]]
136+
=== Bug Reproduction
137+
138+
When you submit a bug ticket, the fastest path for us to resolve the issue is
139+
by providing a bug reproduction. Take a glance at {rnrh-test-folder}[our test folder] and get
140+
inspiration by looking at __regression tests__. You are also advised to read our <<DEVELOPING.adoc#, developing guide>>. The PR is ready __when the
141+
test fails__.
142+
143+
=== Features
144+
145+
[NOTE]
146+
We recommend you use the
147+
https://github.blog/2019-02-14-introducing-draft-pull-requests/[draft Github option]
148+
when you start a Feature PR!
149+
150+
If your PR provides new features, it means that the API of this library will
151+
likely change. You will be required to test the new
152+
feature. Take a look at {rnrh-test-folder}[our test folder]. You are also advised to read our <<DEVELOPING.adoc#, developing guide>>. If you're lost, we will be glad to help you, either on
153+
discord or within the PR on GitHub.
154+
155+
156+
[[rfc]]
157+
=== Request For Comments
158+
159+
[NOTE]
160+
RFC are propositions for new methods, behaviors and other API capabilities, or
161+
the exploration of an algorithmic challenge that is specific to this library.
162+
These are not Internet Society's RFCs! We don't have a rich multi-stage process. An
163+
RFC is either a draft, in discussion, or adopted (merged). We thereafter use
164+
versioning to polish and enhance those specifications.
165+
166+
RFC purpose is to offer drafts for new ideas which goes relatively in depth
167+
regarding the issues, consequences and caveats of a peculiar feature. We don't
168+
have strict requirements, but the structure should loosely resemble the
169+
following:
170+
171+
1. Problem Frame (what is the context and which issues this enhancement or
172+
feature will address).
173+
2. Requirements (what are the behaviors required for this feature to be
174+
supported?).
175+
176+
You can take a look at drafts in
177+
https://github.com/native-html/core/tree/master/rfc[the `rfc`
178+
folder] for inspiration.
179+
180+
[NOTE]
181+
We require RFCs to be written in *AsciiDoc*. If you know
182+
markdown, it is very easy to pick and it ends-up much more powerful and
183+
versatile. Their documentation is of excellent quality, as proven by their
184+
https://asciidoctor.org/docs/asciidoc-writers-guide/[writer's guide].
185+
186+
=== Other
187+
188+
For other type of contributions (documentation, enhancements), we don't __a
189+
priori__ require anything particular.

DEVELOPING.adoc

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
:hide-uri-scheme:
2+
ifdef::env-github[]
3+
:tip-caption: :bulb:
4+
:note-caption: :information_source:
5+
:important-caption: :heavy_exclamation_mark:
6+
:caution-caption: :fire:
7+
:warning-caption: :warning:
8+
endif::[]
9+
:toc:
10+
11+
= Participating in RNRH development
12+
13+
== Initializing the project
14+
15+
Clone the project:
16+
```
17+
git clone git@github.com:native-html/core.git
18+
```
19+
Then yarn-install:
20+
```
21+
cd @native-html/render
22+
yarn install
23+
```
24+
25+
== Package sources
26+
27+
Package sources are located in `packages/render-html`.
28+
29+
30+
== Scripts
31+
32+
The project is using
33+
Yarn Berry's workspaces. There is an alias to work from
34+
`@native-html/render` workspace:
35+
36+
```
37+
yarn render
38+
```
39+
40+
You can then run the following commands:
41+
42+
[cols="1,1"]
43+
|===
44+
| Most significant scripts
45+
| Description
46+
47+
| `yarn render-html test:jest --watch`
48+
| Launch jest test in watch mode
49+
50+
| `yarn render-html test:ts`
51+
| Run Typescript typechecking
52+
53+
| `yarn render-html test:lint`
54+
| Run linter
55+
56+
| `yarn render-html build`
57+
| Transpile TS → ES
58+
|===
59+
60+
== Demo app
61+
62+
```
63+
yarn build:tools
64+
yarn render-html build
65+
```
66+
67+
From now-on, you should be able to try out the demo app with
68+
```
69+
yarn demo start
70+
```
71+
72+
== Documentation
73+
74+
All the doc pages are React components available in
75+
`doc-tools/doc-pages/src/pages` and are built for both the Discovery expo app
76+
and website.

0 commit comments

Comments
 (0)