Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC] Introduce infiniteWidth document
For some reason I don't understand, breakParent doesn't have the intended effect. But having a document that always puts the remaining with to < 0 does. I'm pretty sure that we should actually fix the issue with breakParent but wanted to show a solution that would work. Fixes #625 Fixes #616
- Loading branch information
Showing
7 changed files
with
253 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`infinite.js 1`] = ` | ||
"function f() { | ||
if (position) | ||
return {name: pair}; | ||
else | ||
return {name: pair.substring(0, position), value: pair.substring(position + 1)}; | ||
} | ||
function f() { | ||
if (position) return { name: pair }; | ||
else return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
function f() { | ||
if (position) | ||
return { name: pair }; | ||
else | ||
return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} | ||
/> | ||
</View> | ||
); | ||
} | ||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total, | ||
), | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total, | ||
), | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
function f() { | ||
if (position) return { name: pair }; | ||
else return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
function f() { | ||
if (position) return { name: pair }; | ||
else return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
function f() { | ||
if (position) return { name: pair }; | ||
else return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total | ||
) | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total | ||
) | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total | ||
) | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function f() { | ||
if (position) | ||
return {name: pair}; | ||
else | ||
return {name: pair.substring(0, position), value: pair.substring(position + 1)}; | ||
} | ||
|
||
function f() { | ||
if (position) return { name: pair }; | ||
else return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
|
||
function f() { | ||
if (position) | ||
return { name: pair }; | ||
else | ||
return { | ||
name: pair.substring(0, position), | ||
value: pair.substring(position + 1) | ||
}; | ||
} | ||
|
||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={(e) => this.setState({progress: Math.round(100 * e.nativeEvent.loaded / e.nativeEvent.total)})} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total, | ||
), | ||
})} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
function render() { | ||
return ( | ||
<View> | ||
<Image | ||
onProgress={e => | ||
this.setState({ | ||
progress: Math.round( | ||
100 * e.nativeEvent.loaded / e.nativeEvent.total, | ||
), | ||
})} | ||
/> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run_spec(__dirname); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters