Last active
October 31, 2022 18:48
-
-
Save Tiagoperes/74808ebd7ad7f0645491fc60436223a6 to your computer and use it in GitHub Desktop.
Nimbus navigation test
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
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "This is an invalid json (extra comma right here)", | |
} | |
} |
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
{ | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Screen 1" | |
} | |
}, | |
{ | |
"properties": { | |
"text": "This component is malformed (missing the \"component\" key)" | |
} | |
} | |
] | |
} |
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
{ | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Root" | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Present", | |
"onPress": [{ | |
"_:action": "present", | |
"properties": { | |
"url": "/presentable.json" | |
} | |
}] | |
} | |
} | |
] | |
} |
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
{ | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Presenting" | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Present another", | |
"onPress": [{ | |
"_:action": "present", | |
"properties": { | |
"url": "/presentable.json" | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Dismiss", | |
"onPress": [{ | |
"_:action": "dismiss" | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Start navigation flow", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/screen1.json" | |
} | |
}] | |
} | |
} | |
] | |
} |
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
{ | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Screen 1" | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Next", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/screen2.json" | |
} | |
}] | |
} | |
} | |
] | |
} |
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
{ | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Screen 2" | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Next", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/screen3.json" | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Previous", | |
"onPress": [{ | |
"_:action": "pop" | |
}] | |
} | |
} | |
] | |
} |
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
{ | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Screen 3" | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Next (error with fallback)", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/screen4.json", | |
"fallback": { | |
"_:component": "layout:container", | |
"children": [ | |
{ | |
"_:component": "material:text", | |
"properties": { | |
"text": "Error fallback" | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Back to /screen2 (popTo)", | |
"onPress": [{ | |
"_:action": "popTo", | |
"properties": { | |
"url": "/screen2.json" | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Back to last page (pop)", | |
"onPress": [{ | |
"_:action": "pop" | |
}] | |
} | |
} | |
] | |
} | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Next (ResponseError: 404)", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/screen4.json" | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Next (MalformedJsonError: invalid json)", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/invalid.json" | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Next (MalformedComponentError)", | |
"onPress": [{ | |
"_:action": "push", | |
"properties": { | |
"url": "/malformed.json" | |
} | |
}] | |
} | |
}, | |
{ | |
"_:component": "material:button", | |
"properties": { | |
"text": "Previous", | |
"onPress": [{ | |
"_:action": "pop" | |
}] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment