Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
53855a35
Commit
53855a35
authored
Jan 05, 2021
by
André Luís
Committed by
Enrique Alcantara
Jan 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some FE examples
parent
1a6f36f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
doc/development/transient/prevention-patterns.md
doc/development/transient/prevention-patterns.md
+35
-1
No files found.
doc/development/transient/prevention-patterns.md
View file @
53855a35
...
...
@@ -6,5 +6,39 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Preventing Transient Bugs
This page will cover architectural patterns
developers should employ when building new features
to prevent transient bugs.
This page will cover architectural patterns
and tips for developers to follow
to prevent transient bugs.
## Frontend
### Don't rely on response order
When working with multiple requests, it's easy to assume the order of the responses will match the order in which they are triggered.
That's not always the case and can cause bugs that only happen if the order is switched.
**Example:**
*
diffs_metadata.json (lighter)
*
diffs_batch.json (heavier)
If your feature requires data from both, ensure that the two have finished loading before working on it.
### Simulate slower connetions when testing manually
Add a network condition template to your browser's dev tools to enable you to toggle between a slow and a fast connection.
**Example:**
*
Turtle:
*
Down: 50kb/s
*
Up: 20kb/s
*
Latency: 10000ms
### Collapsed elements
When setting event listeners, if not possible to use event delegation, ensure all relevant event listeners are set for expanded content.
Including when that expanded content is:
*
**Invisible**
(
`display: none;`
). Some javascript requires the element to be visible to work properly (eg.: when taking measurements).
*
**Dynamic content**
(AJAX/DOM manipulation).
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment