Qinya Xu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # MSTU5003 Project: Web App UI ### Group 6: Wentao Wu, Yifan Chen, Zhiyin Wang, Qinya Xu <span class="link">:link: [Our Project Page](https://codepen.io/ww2640/full/poVQqLa) :link:</span> --- # Description of Application & ***User Interaction*** ### Introduction For our project, we designed a web interactive toy to help users learn knowledge about coffee. This application consists of four sequential sections: origin, roasting, brewing, sharing. Following these sections, users will start to learn about the "Journey of a Bean -- How coffee travel from around the globe to their hand." At the end, users will be able to create their own unique taste of coffee and share to their social media. Our target audiences are anyone who are interested in learning coffee. And we incorporate the idea of constructionism in the learning process. ### Step 1: Origin At the beginning, users will able to select the origin of coffee on a world map. By clicking the yellow buttons which marked the location of countries, users can view the introduction of the coffee flavor produced specifically in that region. **Ideally when the user click the button for different regions, an interactive list will be appended to the bottom of the html section showing users all the different countries and coffee varieties in that region. The displayed coffee varieties may differ according to the region. Therefore we will use DOM to locate the interactive list and modify the content**. The purpose of this section is to allow the user to explore the abundant coffee world through interaction. After users select the variety that they interested in, by clicking the button "confirm variety" (right now is "confirm origin"), they will be able to select one unique coffee bean, which lead the users to the next section -- put this type of coffee bean into a coffee roaster. **Again, ideally we would not use anchor element to move around the webpage through `href = #id`, but instead would let the webpage totally change content to section 2 using Javascript function `nextSection()`. Also, a new variable called origin will be declared in the script and store the ID of the chosen coffee variety in the form of a number for later use**. >[color=skyblue]Our current interaction in detail: When the user clicks on the button on the map, there will be a `aria-describedby=popover#####` added at the end of the button element, which enables the popover function. When the user hits the "confirm origin" button, html of the first carousel item (the map) changes from `div class="carousel-item active"` to `div class="carousel-item"`. After transitioning to the second carousel item (user's choice of bean), an `active` is added to the class of the sencond carousel item. The button "Accept This Choice" is an anchor element that has a href to the id of next section i.e.,`href=#roasterlevels`. ### Step 2: Roasting Before clicking the red button: Start roasting, users need to play around with two parameters: heat and time, which represent the temperature of the roaster and how long the roasting process would be. **We will register a listener to heat slider's `OnValueChange` event and callback to a delegate "Change roaster color" with the slider value. As a result, the color of the roaster will vary correspondingly with the change in sliders to indicate the tempreture of the roaster. These two range sliders would each return a unique number to each variable in the Javascript. Once the user clicks the "Start Roasting" button, a function `roast(heat, time)` would be called taking in two parameters from the range sliders. Then, a canvas element will be appended below the "Start Roasting" button and through Javascript a graph simulating the change in coffee temperature would gradually be drawn (right now we are using an image to indicate the final result).** In our project, we use the full-city roast (210 - 221 °C) as an example. **But ideally, the `roast(heat, time)` function would return an object of `{roasteLevel: a string (e.g. "cinnamon roast"), roastQuality: another number}`** Users can also learn more about the relationship between coffee flavor and heat/time adjustment by checking url "this website." Finally, users can confirm their choice by clicking the button "That's the bean I want!", which will lead them to the third section. >[color=skyblue]Our current interaction in detail: We use collapse function of boostrap. When user hits the button "Start Roasting!," value of `aria-expand` changes from `false` to `true`, and a `class` is added to the end of button element to unfold the collapsed items (the heat graph and the second confirm button). At the same time, a `show` class is added to the end of the unfolded `div`. Like in the previous section, the button below the heatgraph is an anchor element that will direct to the next section. ### Step 3: Brewing In this section, users need to first read and get a general understanding of each brewing method before choosing the one they think would fit their coffees the best. As users select their method, **A designated section for it will show up, this can potentially be achieved by assigning an ID number to each method's "Choose this method" button and use a `chooseMethod(id)` function to show the designated section**. In the new section, users are able to adjust temperature, time and grind size by moving the sliders. **Similar to the roasting section, the three sliders will also return three number variables.** We use Pour Over as our example here. **When the "Let's test it out" button is pressed, a function `brew(time, temperature, groundSize)` will be called and return an object with 2 properties: `{extractionRatio: a percentage number(16), totalDissolvedSolids: a number(1.5)}`. Then, another function `calculateScore()` will be called and return an object with 5 properties: `{aroma: score(number), body: score, balance: score, acidity: score, sweetness: score}`. The scores are calculated using the origin ID, 3 roast object values, and 2 brew object values** >[color=skyblue]When the user clicks on any of the six buttons, the html of the first carousel item (the description of brewing methods) will change from `class="carousel-item active"` to `class="carousel-item"`, which disactivates the carousel item. This action will also activates the next carousel item by adding an `active` class to the second carousel item (the decision of brewing method). When the user clicks on the "let's test it out" button, the page will go to the next section because the button is an anchor element that has a href that linked to next section's id,`href=#sharing`. ### Step 4: Sharing Finally, users create their own cup of coffee with the information of origin, roast level and brewing method according to what they selected. **The script will append information to the `<span>` element in the `.result-bean` class in this section in the order of origin, roast level and brewing method.** The coffee created by users will also get simulated scores **In Javascript, a pentagon statistics chart will be created using the five properties returned from the calculateScore() function and the corresponding scores will be drawn on the chart**. At the end, users can name and share their unique coffee flavor through the link to social media. **Before actually sharing, a Bootstrap modal will showup with a preview of the content being shared. The Javascript will dynamically change the content in the `.modal-body` to correctly reflect the user's decision.** >[color=skyblue]Clicking on the social media buttons will give rise to a pop-up window. This is enabled by adding a `show` class to the pop-up window when clicking on the buttons. ## Reflection - Please include a little bit of reflection on the process you went through - what did you learn, what was challenging, how do you think you need to improve, what are the next steps forward for you and your learning! etc. ### Wentao Wu: Figma is such an AWESOME tool for website planning. I have learned that with a sophisticated prior planning, designning webpage can be much more efficient. One challenge I faced was to actually think about how the user experience would be. How the flow of the website should go, how big the fonts should be, and so on. As a result, I have spent a ton of time making the website at least satisfactory to me. In the future, I would love to learn more convenient tricks for improving UX and learn JS that can make the website much more interactive. In the technical aspect, I learned how to layout the cards while using the bootstrap grid system. This task is not as easy as it seems, because each BS cards have a pre-determined width, so when I tried to use `col-lg` or similar classes, the end result is not centered as it should be. Also, I managed to change the pentagon statistic graph to better fit our webpage. Reading the JS and modifying it is actually fun! As Lisa Lei requested, I have explained the JS part to my teammates. In addition, I also added many carousels in the webpage while manipulating the next button. By deleting the next button in the format and add the `data-bs-target="#originCarouselControls" data-bs-slide="next"` to the button I want, I managed to create a fancy animation simulating different steps in various sections. ### Yifan Chen: I faced a problem in letting the location button scaling with the map picture in different screen width and height. To make sure that the button is in the right position in different screen width, I tried may approaches and finally find one that will work. First, the map image is a background image of div and I restricted the the size using calc() function(Or just add an image with bootstrap class="img-fluid"). And the button is displayed abosolute and is anchored to the left-top of their parent. Next, use `left: 30%;`(map width equals parent's width so it's ok to set directly using `left`, but top-margin cannot use `top`) and`margin-top:calc(100vw * 0.7 / 1.8974);`(view width * desired relative position / (pic width/height)). As a result, the button will scale with the background picture. During the process, I learned about the position property of CSS and some tricks in making responsive website. I think I need to improve the design of a website and how to use code to acheive the disired layout. ### Zhiying Wang: I got a lot of hands-on experience on Boostrape during the process and I became more familiar with it. I learned some wonderful functions such as collapse function and using anchor element to direct users to the next page when clicking a button. In addition, during the collaboration with my group members, I found out the importance of adding a closing tag as soon as possible (even before adding the actural content) because it will affect people who are working on the later parts. However, I got frustrated with the layout of elements, such as how to center elements, how to put texts before slider, etc. During the class session, I learned how to put text before the slider using `label` before the `input` (I also figured out that slider was one kind of input element!). I plan to work on developing a more clear understanding on the visual structure of code, such as the formatting of blocks and the use of grid system to achieve desired results. ### Qinya Xu: During the process, I learned many new bootstrap tricks, such as how to use Collapse to hide and show the content in order to make the "Start Roasting" button works. Also, how to create a range slider by adding html and css rules (https://www.w3schools.com/howto/howto_js_rangeslider.asp) When building the second section, I faced a lot of challenges, even though I can build the lay out by using bootstrap's Grid system (container, row, column). It is difficult to create a nice, clear lay out for the section. Additional css rules need to be adjusted. Another challenge is indentation. As I went through the project process, I found that it is hard for me to keep the format of my code clear and accurate. I think what I need to improve is remember to use shortcut so I will not forget the closing tag and spend time checking. As a beginner of code learning, I think I need to spend more time exploring the bootstrap official websites and practicing on CodePen. <style> .link{ font-size: 2rem; } </style>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully