Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor documentation using better docs #44

Merged
merged 3 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 156 additions & 72 deletions docs/App.js.html
Original file line number Diff line number Diff line change
@@ -1,106 +1,190 @@


<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>JSDoc: Source: App.js</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> App.js</title>

<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script src="./build/entry.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
<link type="text/css" rel="stylesheet" href="">
<script async defer src="https://buttons.github.io/buttons.js"></script>


</head>

<body>

<div id="main">

<h1 class="page-title">Source: App.js</h1>

<body class="layout small-header">
<div id="stickyNavbarOverlay"></div>


<div class="top-nav">
<div class="inner">
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
<div class="logo">


<a href="index.html">
<h1 class="navbar-item">React components</h1>
</a>

</div>
<div class="menu">

<div class="navigation">
<a
href="index.html"
class="link"
>
API Documentation
</a>



</div>
</div>
</div>
</div>
<div id="main">
<div
class="sidebar "
id="sidebarNav"
>

<nav>

<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#TTSengine">TTSengine</a></li></ul></div><div class="category"><h2>Components</h2><h3>Classes</h3><ul><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#RouteButton">RouteButton</a></li></ul></div><div class="category"><h2>Controller</h2><h3>Global</h3><ul><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Global</h3><ul><li><a href="global.html#CompleteScreen">CompleteScreen</a></li><li><a href="global.html#DimensionScreen">DimensionScreen</a></li><li><a href="global.html#HomeScreen">HomeScreen</a></li><li><a href="global.html#MapScreen">MapScreen</a></li><li><a href="global.html#RegistrationScreen">RegistrationScreen</a></li><li><a href="global.html#TermsAndConditionsScreen">TermsAndConditionsScreen</a></li><li><a href="global.html#UnitScreen">UnitScreen</a></li><li><a href="global.html#WelcomeScreen">WelcomeScreen</a></li></ul></div><div class="category"><h2>Utils</h2><h3>Global</h3><ul><li><a href="global.html#asyncTimeout">asyncTimeout</a></li></ul></div>

</nav>
</div>
<div class="core" id="main-content-wrapper">
<div class="content">
<header class="page-title">
<p>Source</p>
<h1>App.js</h1>
</header>





<section>
<article>
<pre class="prettyprint source linenums"><code>import { StatusBar } from 'expo-status-bar'
import React from 'react'
import { Button, StyleSheet, Text, View, Alert } from 'react-native'
import { Header } from 'react-native-elements'
// import Meteor, { Mongo, withTracker } from '@meteorrn/core'
// import Meteor from '@meteorrn/core'
<pre class="prettyprint source linenums"><code>import React, { useEffect, useState } from 'react'
import { StyleSheet, View } from 'react-native'
import * as Font from 'expo-font'
import AppLoading from 'expo-app-loading'
import * as Speech from 'expo-speech'
import { TTSengine } from './components/Tts'
import Navigator from './navigation/navigator'
import './i18n'

// Meteor.connect("ws://127.0.0.1:3000/websocket");
/**
* @private used to load our custom font
* @return {Promise&lt;void>}
*/
const fetchFonts = () => {
return Font.loadAsync({
semicolon: require('./assets/fonts/SemikolonPlus-Regular.ttf')
})
}

/**
* The Application root
* @comonent
* @return {*}
* @constructor
* @private stylesheet
*/
export default function App () {
return (
const styles = StyleSheet.create({
screen: {
flex: 1
}
})

// inject expo-speech as our current
// speech-synthesis implementation
TTSengine.setSpeech(Speech)

&lt;View style={styles.header}>
&lt;Header
leftComponent={{ icon: 'menu', color: '#fff' }}
centerComponent={{ text: 'lea.online Application ', style: { color: '#fff' } }}
rightComponent={{ icon: 'home', color: '#fff' }}
/**
* Main Application entry point
* @category Global
* @component
* @returns {JSX.Element}
*/
export default function App () {
const [fontLoaded, setFontLoaded] = useState(false)
const [waitForInterval, setWaitThreeSeconds] = useState(false)

// use this effect to make the splash screen remain
// for a few seconds, once the font has been loaded
useEffect(() => {
if (fontLoaded) {
// TODO Timeout variable should be later set in a separate global environment file
setTimeout(() => {
setWaitThreeSeconds(true)
}, 1000)
}
}, [fontLoaded])

if (!waitForInterval) {
return (
&lt;AppLoading
startAsync={fetchFonts}
onFinish={() => setFontLoaded(true)}
onError={(error) => console.warn(error)}
/>
&lt;View style={styles.container}>

&lt;Text testID='textField'>Test Meteor Application
&lt;/Text>
&lt;StatusBar style='auto' />

&lt;Button
testID='Button'
title='Press This Button, please'
onPress={() => Alert.alert('Button is working')}
/>
&lt;/View>
)
}

return (
&lt;View style={styles.screen}>
&lt;Navigator />
&lt;/View>

)
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center'
},

header: {
width: '100%',
height: '100%'

}
})
</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.exports.html">exports</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jul 14 2021 11:41:25 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
</div>

<footer class="footer">
<div class="content has-text-centered">
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a></p>
<p class="sidebar-created-by">
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
</p>
</div>
</footer>

</div>
<div id="side-nav" class="side-nav">
</div>
</div>
<script src="scripts/app.min.js"></script>
<script>PR.prettyPrint();</script>
<script src="scripts/linenumber.js"> </script>

</body>
</html>
6 changes: 3 additions & 3 deletions docs/TitleText.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h1 class="navbar-item">React components</h1>

<nav>

<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes</h3><ul><li><a href="RegistrationScreen.html">RegistrationScreen</a></li><li><a href="RouteButton.html">RouteButton</a></li><li><a href="TermsAndConditionsScreen.html">TermsAndConditionsScreen</a></li><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Classes</h3><ul><li><a href="WelcomeScreen.html">WelcomeScreen</a></li></ul></div>
<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#TTSengine">TTSengine</a></li></ul></div><div class="category"><h2>Components</h2><h3>Classes</h3><ul><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#RouteButton">RouteButton</a></li></ul></div><div class="category"><h2>Controller</h2><h3>Global</h3><ul><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Global</h3><ul><li><a href="global.html#CompleteScreen">CompleteScreen</a></li><li><a href="global.html#DimensionScreen">DimensionScreen</a></li><li><a href="global.html#HomeScreen">HomeScreen</a></li><li><a href="global.html#MapScreen">MapScreen</a></li><li><a href="global.html#RegistrationScreen">RegistrationScreen</a></li><li><a href="global.html#TermsAndConditionsScreen">TermsAndConditionsScreen</a></li><li><a href="global.html#UnitScreen">UnitScreen</a></li><li><a href="global.html#WelcomeScreen">WelcomeScreen</a></li></ul></div><div class="category"><h2>Utils</h2><h3>Global</h3><ul><li><a href="global.html#asyncTimeout">asyncTimeout</a></li></ul></div>

</nav>
</div>
Expand Down Expand Up @@ -191,7 +191,7 @@ <h5>Parameters:</h5>
<td class="type">


<span class="param-type">css</span>
<span class="param-type">StyleSheet</span>



Expand Down Expand Up @@ -249,7 +249,7 @@ <h5>Parameters:</h5>
<p class="tag-source">
<a href="components_TitleText.js.html" class="button">View Source</a>
<span>
<a href="components_TitleText.js.html">components/TitleText.js</a>, <a href="components_TitleText.js.html#line11">line 11</a>
<a href="components_TitleText.js.html">components/TitleText.js</a>, <a href="components_TitleText.js.html#line13">line 13</a>
</span>
</p>

Expand Down
45 changes: 27 additions & 18 deletions docs/components_RouteButton.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h1 class="navbar-item">React components</h1>

<nav>

<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes</h3><ul><li><a href="RegistrationScreen.html">RegistrationScreen</a></li><li><a href="RouteButton.html">RouteButton</a></li><li><a href="TermsAndConditionsScreen.html">TermsAndConditionsScreen</a></li><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Classes</h3><ul><li><a href="WelcomeScreen.html">WelcomeScreen</a></li></ul></div>
<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#TTSengine">TTSengine</a></li></ul></div><div class="category"><h2>Components</h2><h3>Classes</h3><ul><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#RouteButton">RouteButton</a></li></ul></div><div class="category"><h2>Controller</h2><h3>Global</h3><ul><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Global</h3><ul><li><a href="global.html#CompleteScreen">CompleteScreen</a></li><li><a href="global.html#DimensionScreen">DimensionScreen</a></li><li><a href="global.html#HomeScreen">HomeScreen</a></li><li><a href="global.html#MapScreen">MapScreen</a></li><li><a href="global.html#RegistrationScreen">RegistrationScreen</a></li><li><a href="global.html#TermsAndConditionsScreen">TermsAndConditionsScreen</a></li><li><a href="global.html#UnitScreen">UnitScreen</a></li><li><a href="global.html#WelcomeScreen">WelcomeScreen</a></li></ul></div><div class="category"><h2>Utils</h2><h3>Global</h3><ul><li><a href="global.html#asyncTimeout">asyncTimeout</a></li></ul></div>

</nav>
</div>
Expand All @@ -95,27 +95,14 @@ <h1>components/RouteButton.js</h1>
import { TTSengine } from '../components/Tts'
import Colors from '../constants/Colors'

/**
* @private
*/
const Tts = TTSengine.component()

/**
* RouteButton contains an icon and a button.
* @param {string} props.title: The displayed and spoken title
* @param {string} props.icon: The icon for the button
* @param {function} props.handleScreen The screen to be navigated
* @returns {JSX.Element}
* @constructor
* @private
*/
const RouteButton = props => {
return (
&lt;View style={styles.body}>
&lt;Tts text={props.title} color={Colors.primary} id={6} testId='routeButton' dontShowText />
&lt;View style={styles.button}>
&lt;Button icon={&lt;Icon type='font-awesome-5' name={props.icon} size={25} color={Colors.primary} />} title={props.title} titleStyle={styles.buttonTitle} buttonStyle={{ borderRadius: 15, paddingTop: 10 }} type='outline' onPress={props.handleScreen} />
&lt;/View>
&lt;/View>
)
}

const styles = StyleSheet.create({
body: {
flex: 1,
Expand All @@ -131,6 +118,28 @@ <h1>components/RouteButton.js</h1>
}
})

/**
* RouteButton contains an icon and a button and a handler for the routing.
* It renders with default styles.
*
* @category Components
* @param {string} props.title: The displayed and spoken title
* @param {string} props.icon: The icon for the button
* @param {function} props.handleScreen The screen to be navigated
* @component
* @returns {JSX.Element}
*/
const RouteButton = props => {
return (
&lt;View style={styles.body}>
&lt;Tts text={props.title} color={Colors.primary} id={6} testId='routeButton' dontShowText />
&lt;View style={styles.button}>
&lt;Button icon={&lt;Icon type='font-awesome-5' name={props.icon} size={25} color={Colors.primary} />} title={props.title} titleStyle={styles.buttonTitle} buttonStyle={{ borderRadius: 15, paddingTop: 10 }} type='outline' onPress={props.handleScreen} />
&lt;/View>
&lt;/View>
)
}

export default RouteButton
</code></pre>
</article>
Expand Down
6 changes: 4 additions & 2 deletions docs/components_TitleText.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h1 class="navbar-item">React components</h1>

<nav>

<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Classes</h3><ul><li><a href="RegistrationScreen.html">RegistrationScreen</a></li><li><a href="RouteButton.html">RouteButton</a></li><li><a href="TermsAndConditionsScreen.html">TermsAndConditionsScreen</a></li><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Classes</h3><ul><li><a href="WelcomeScreen.html">WelcomeScreen</a></li></ul></div>
<h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Global</h3><ul><li><a href="global.html#changeColor">changeColor</a></li><li><a href="global.html#TTSengine">TTSengine</a></li></ul></div><div class="category"><h2>Components</h2><h3>Classes</h3><ul><li><a href="TitleText.html">TitleText</a></li><li><a href="ttsComponent.html">ttsComponent</a></li></ul><h3>Global</h3><ul><li><a href="global.html#RouteButton">RouteButton</a></li></ul></div><div class="category"><h2>Controller</h2><h3>Global</h3><ul><li><a href="global.html#Stack">Stack</a></li></ul></div><div class="category"><h2>Screens</h2><h3>Global</h3><ul><li><a href="global.html#CompleteScreen">CompleteScreen</a></li><li><a href="global.html#DimensionScreen">DimensionScreen</a></li><li><a href="global.html#HomeScreen">HomeScreen</a></li><li><a href="global.html#MapScreen">MapScreen</a></li><li><a href="global.html#RegistrationScreen">RegistrationScreen</a></li><li><a href="global.html#TermsAndConditionsScreen">TermsAndConditionsScreen</a></li><li><a href="global.html#UnitScreen">UnitScreen</a></li><li><a href="global.html#WelcomeScreen">WelcomeScreen</a></li></ul></div><div class="category"><h2>Utils</h2><h3>Global</h3><ul><li><a href="global.html#asyncTimeout">asyncTimeout</a></li></ul></div>

</nav>
</div>
Expand All @@ -94,8 +94,10 @@ <h1>components/TitleText.js</h1>

/**
* TitleText is a component of Tts. It displays the spoken text.
*
* @category Components
* @param {string} props.text: The displayed text
* @param {css} props.style: The style elements for the text
* @param {StyleSheet} props.style: The style elements for the text
* @returns {JSX.Element}
* @constructor
*/
Expand Down
Loading