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

Add app bar documentation #108

Merged
merged 3 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
Binary file added docs/pages/appbars/back-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/bottom-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/do-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/dont-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/exception-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/exception-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/exception-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/exception-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/form-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
188 changes: 188 additions & 0 deletions docs/pages/appbars/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<template>

<DocsPageTemplate>

<DocsPageSection title="Overview" anchor="#overview">
<p>
App bars are used to provide users a means of navigation through pages in our applications. They allow access to top-level pages, navigate back to a specific page, or dismiss edit forms
khangmach marked this conversation as resolved.
Show resolved Hide resolved
</p>

<p>
We have four types of app bars: <em>primary bars</em>, <em>back arrow bars</em>, <em>form bars</em>, and <em>bottom bars</em>
</p>

<h3>Primary bars</h3>
<p>Primary bars are placed on top level pages in Kolibri. They may house subtabs that lead to different sections of the application</p>
khangmach marked this conversation as resolved.
Show resolved Hide resolved
<DocsShow>
<img class="modal-img" src="./primary-1.png">
</DocsShow>
<DocsShow>
<img class="modal-img" src="./primary-2.png">
</DocsShow>

<h3>Back arrow bars</h3>
<p>Back arrow topbars allow users to navigate back to the previous page</p>
khangmach marked this conversation as resolved.
Show resolved Hide resolved
<DocsShow>
<img class="modal-img" src="./back-1.png">
</DocsShow>

<h3>Form bars</h3>
<p>Form bars allows users to dismiss a full-screen form and land on the previous page</p>
khangmach marked this conversation as resolved.
Show resolved Hide resolved
<DocsShow>
<img class="modal-img" src="./form-1.png">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have specifications on when to use black color vs purple? Or is this something we're looking to deprecate? It looks like there's a spec for the content renderer without its black app bar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided during documentation phase that black is just for pages with editing functionality (single-task pages)

</DocsShow>

<h3>Bottom bars</h3>
<p>Bottom bars are placed on pages that house editing, content selection, or multi-step processes. They may contain buttons that allow the user to submit specific action(s) or continue with the process. Bottom bars can also contain contextual information and error messaging relevant to the task</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be helpful to specify when we should and shouldn't use a bottom bar, and also what type of metadata is and isn't allowed here. I remember you mentioned there's specific kind of metadata that would go on the left side of the bottom bar vs the metadata that would appear right next to the submit/cancel buttons

Copy link
Contributor Author

@khangmach khangmach Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided that further bottom bar specifications would be housed in the single task page pattern doc (on the way). This is why I generalized it here as "contextual information". See more here: https://docs.google.com/document/d/1wQa3MitsbjLnF4_POvXO6v2X-dGKru52RmIkOZHzkko/edit#heading=h.og8271ldbw4c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can a few layout pointers in the layout section. But as for "when to use", they should only be used on single task pages

<DocsShow>
<img class="modal-img" src="./bottom-1.png">
</DocsShow>
</DocsPageSection>

<DocsPageSection title="Layout" anchor="#layout">
<ul>
<li>Place navigation icons on the far left</li>
<li>Place titles to the right of the navigation icon</li>
<li>Place contextual icons to the far right</li>
</ul>
</DocsPageSection>

<DocsPageSection title="Titles" anchor="#titles">
<p>Appbars must have titles that describe the current page</p>
<ul>
<li>Titles can describe a feature a user is engaged in (e.g. Create Quiz)</li>
<li>Titles can describe a high-level section of an app (e.g. Learn, Coach)</li>
<li>Titles can describe an application being used (e.g. Kolibri Studio)</li>
<li>Titles should never include names of user generated text (e.g. resource title or username)</li>
</ul>
</DocsPageSection>

<DocsDoNot>
<template v-slot:do>
<img src="./do-1.png">
<p class="do-dont">
Use general titles in app bars
</p>
</template>
<template v-slot:not>
<img src="./dont-1.png">
<p class="do-dont">
Use user-generated text in app bars
</p>
</template>
</DocsDoNot>

<DocsPageSection title="Exceptions" anchor="#exceptions">
<p>Purposeful exceptions can be made to incorporate special elements into top bars</p>
</DocsPageSection>

<DocsDoNot style="display: inline-block;">
<template v-slot:do>
<img src="./exception-1.png">
khangmach marked this conversation as resolved.
Show resolved Hide resolved
<p class="do-dont">
Appbar color may change to white for critical workspaces
khangmach marked this conversation as resolved.
Show resolved Hide resolved
</p>
</template>
</DocsDoNot>

<DocsDoNot style="display: inline-block;">
<template v-slot:do>
<img src="./exception-2.png">
<p class="do-dont">
Learning aids and indicators can be placed in app bars
</p>
</template>
</DocsDoNot>

<DocsDoNot style="display: inline-block;">
<template v-slot:do>
<img src="./exception-3.png">
<p class="do-dont">
Search text fields can be placed in app bars when global searching is a critical feature
khangmach marked this conversation as resolved.
Show resolved Hide resolved
</p>
</template>
</DocsDoNot>

<DocsDoNot style="display: inline-block;">
<template v-slot:do>
<img src="./exception-4.png">
<p class="do-dont">
For resource pages in the Learn app, use a back link at the top of the page instead of an app bar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this tracked as an issue? I know this is what we want to move towards, but we should make sure it describes the current, or soon to be, state of things

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a tracked issue once I finalize all the documentation related to it. Will comment out in the meantime

khangmach marked this conversation as resolved.
Show resolved Hide resolved
</p>
</template>
</DocsDoNot>

<DocsPageSection title="Icons" anchor="#icons">
<ul>
<li>Menu icon: opens up a navigation drawer</li>
<li>Back arrow: takes the user back to the previous page</li>
<li>Close icon: dismisses the edit form from view</li>
</ul>
</DocsPageSection>

<DocsPageSection title="Behaviors" anchor="#browser-behaviors">
khangmach marked this conversation as resolved.
Show resolved Hide resolved
<h3>Browser</h3>
<ul>
<li>Back and forward buttons can move a user through topbar tabs</li>
<li>Back arrow topbars can be used on both pages that do and do not have a URL</li>
khangmach marked this conversation as resolved.
Show resolved Hide resolved
<li>Appbar actions can be collapsed into an overflow menu as the browser window size decreases</li>
</ul>

<h3>Scrolling</h3>
<ul>
<li>Scrolling upwards hides topbars</li>
<li>Scrolling downwards reveals topbars</li>
<li>Bottom bars are sticky to the bottom of the browser window</li>
</ul>
khangmach marked this conversation as resolved.
Show resolved Hide resolved
</DocsPageSection>

<DocsPageSection title="Accessibility" anchor="#accessibility">
<ul>
<li>Icon and title placement become mirrored for right-to-left languages</li>
<li>Appbar titles and iconography colors must meet <a href="https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html" target="_blank">1.4.3 Contrast (Level AA) criteria</a></li>
</ul>
</DocsPageSection>

<!--<DocsShow>
<img class="modal-img" src="./dropdown-menu.png">
</DocsShow>-->

<!--<DocsShow>
<img class="modal-img" src="./filter-menu.png">
</DocsShow>-->

<!--<DocsDoNot>
<template v-slot:do>
<img src="./icon-do.png">
<p class="do-dont">
Use iconography as a visual aid for important actions
</p>
</template>
<template v-slot:not>
<img src="./icon-dont.png">
<p class="do-dont">
Use repetitive iconography in filter menus
</p>
</template>
</DocsDoNot>-->
khangmach marked this conversation as resolved.
Show resolved Hide resolved

</DocsPageTemplate>

</template>


<script>

export default {};

</script>


<style lang="scss" scoped>

img,
.do-dont {
width: 400px;
}

</style>
Binary file added docs/pages/appbars/primary-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pages/appbars/primary-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/tableOfContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export default [
title: 'Alerts',
disabled: true,
}),
new Page({
path: '/appbars',
title: 'App bars',
}),
new Page({
path: '/badges',
title: 'Badges',
Expand Down