Dash
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • 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 Help
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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    --- title: The Great Cleanup --- # <span style="font-size: 50px;">Dash | **The Great Dash Cleanup**</span> <!-- INFO BOXES :::success GREEN This is for any step by step instructions that students should follow. ::: :::info BLUE This is for important assignment information throughout the assignment: **Released: September 8th, 6:00pm ET** **Due: September 15th, 11:59pm ET** ::: :::warning YELLOW Use this info box for disclaimers. ::: :::danger Use this info box for important points that students should not miss! ::: :::spoiler Dropdown list Use this ::: --> <!-- TYPESCRIPT CODE BLOCKS ```typescript const list = [10, 20]; console.log(list.map(x => (x * x))) ``` --> <!-- HOW TO CHANGE COLOR IN MARKDOWN <span style="background:aliceblue">some text with a **lightblue** background</span> <span style="color:red">some **red** text</span> --> <!-- These are a list of shortcuts available. --> *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium *[NPM]: Node Package Manager *[IDE]: Integrated Development Environment *[MERN]: MongoDB, Express, React, NodeJS *[Yarn]: Yet Another Resource Negotiator # Introduction <div style="text-align:left; margin-bottom: 20px"><img style="border-radius:10px; width:600px" src="https://i.imgur.com/KWddks5.jpg" /></div> Many things in our world need cleaning up...the ocean, political instability...but among the many things one stands out: **the Dash codebase**! Only with a clean Dash codebase can we embark other challenges. I often wonder, "How can we solve world peace without?"...a question no politician has ever been able to answer...until now - with a clean Dash codebase we might be able to solve world peace. So, we embark on this once in a lifetime journey: to hollistically, thoroughly, and vividly clear out the codebase such that it resembles the bluest skies, the shiniest sword. ## Why are we doing this? We are going to be cleaning up the codebase such that it is a more navigatable, usable, and learnable codebase. One that we can more easily make additions to, and also one that we can learn from. <div style="text-align:left; margin-bottom: 20px"><img style="border-radius:10px; width:600px" src="https://cdn-media-1.freecodecamp.org/images/0*q3-4kypImPD0VDPg.jpg " /></div> With a clean codebase, it will be a more enjoyable space for us, and also a more enjoyable space for everyone else in the future who interacts and uses it. ## What are we doing? The idea is that for the first week of the Summer `1st June - 7th June` to focus wholly on cleaning up the codebase. As we cleanup the codebase we will also be understanding it better! We will be doing the following things: - [ ] Getting everything we have been working on over the last semester into the codebase before we start cleaning up - [ ] Reorganising the folder and file structure - [ ] Establishing clear file and code naming conventions - [ ] Refactoring and reorganising code :::info ❗All cleanup will take place on a banch called `master-cleanup` ::: Another thing that is super important to note is that this is a learning process for everyone, so please don't feel at any time like there is a set-in-stone way of doing things - if you would like to propose an alternative just send an email to everyone working over the Summer, to include Bob, otherwise send it in the `#summer-22` slack channel! # A Place for Questions - Should dark mode vs. light mode be part of the Dashboard or the user? - glr: My intuition is that it should be a user setting as it is in many other applications. In particular since I see it as changing the default background + toolbar colors but not the document colors. # Part 1: Finishing and Merging Current Projects :::success **June 1st - June 3rd** ::: The first part of the cleanup is making sure that everything that is currently in progress is completed **and is merged with master**. :::danger This is vital because if we do not first merge with `master-cleanup`, doing this later will become much more difficult and will be full of merge conflicts! Note that since I have already begun cleaning up the `master-cleanup` branch there are bound to already be some merge conflicts. ::: So, although this may seem counterintuitive and against the point of cleaning up - the first thing that we all need to do is make sure that ongoing projects are merged and up-to-date (even if they are not bug-free). Please also ensure that the relevant sections of the documentation in [Dash-Documentation](https://github.com/brown-dash/Dash-Documentation) are also up-to date. ## Distribution of Tasks - Naafi and Mehek in charge of ensuring all `note-taking` and `audio/video` code that has been worked on over the last semester is in the `master-cleanup` branch. - Michael and Jenny in charge of ensuring that all `presentation` work is in the `master-cleanup` branch. # Part 2: File Structure :::success NOTE THAT THIS SECTION IS IN PROGRESS **June 2nd - June 4th** ::: At the moment the file structure is all over the place and looks incredibly menacing when you first load dash. <div style="text-align:center; margin-bottom: 20px"><img style="border-radius:10px; width:200px" src="https://i.imgur.com/EdYXLD2.png " /></div> We need to fix this! :::success Resources on File Structure: - [React tips on organising files](https://reactjs.org/docs/faq-structure.html) - *a very basic guide* - Avoid too much nesting - [An interesting opinion](https://reboot.studio/blog/folder-structures-to-organize-react-project/) - I propose we do feature based structuring ::: The current overall structure is as follows: ```python= src/ |-- client/ |-- debug/ |-- extensions/ |-- fields/ # make sure to read through `Doc.ts` |-- mobile/ # mobile specific files and components here |-- pen-gestures/ # includes GestureUtils.ts, what on earth is `ndollar.ts` (TODO: Ask Bob) |-- scraping/ # this will likely be removed (TODO: Ask Bob) |-- server/ # server and database related code |-- typings/ # it is unclear exactly what this is for and why we have it (TODO: Ask Bob) ``` The majority of restructuring in this section will take place in the `client` folder (though the other folders certainly need some work as well). The current layout of the `client` folder is as follows: ```python= client/ |-- apis/ |-- cognitive_services/ |-- documents/ |-- util/ # should become -> utils |-- views/ # contains all components |-- ... ``` We should reorganise the `views` folder in particular to have the following structure: <div style="text-align:center; margin-bottom: 20px"><img style="border-radius:10px;" src="https://i.imgur.com/5oBJRmH.png " /></div> :::info Please add to this list! **Rules**: - Folders should be lower case - `.tsx` files should be upper case - `.ts` files should be upper case - `.scss` files should be upper case - Only `index.ts` files should be lower case ::: # Part 3: Code Organisation :::success NOTE THAT THIS SECTION IS IN PROGRESS **June 3nd - June 6th** ::: This is related to editing file content in specific. We will have a sample file and some information about how to use the Dash-Component library ready soon! This will also include **exactly** how we will need to set up prettier + esLint so that auto formatting works the same way for everyone. This will also include things like expectations for comments, the way that we will organise each file etc! ## Formatting Code We will be using [Prettier](https://prettier.io) and [ESLint](https://eslint.org) to format and lint the code and to configure our VSCode to format each time we save. :::success 1. Download the VS Code extension: ::: # Part 4: Documentation :::success NOTE THAT THIS SECTION IS IN PROGRESS **June 1nd - June 6th** ::: We should be working on this throughout the week as well! Before we start work on new updates to Dash for the summer, we should make sure that the documentation is updated to match all of the progress we've already made. This is especially important for both outside users and future students working on Dash to be able to understand how what you've built works. The Dash documentation can be found [here](https://brown-dash.github.io/Dash-Documentation/) and the repository to edit this site is in the [brown-dash Github organization](https://github.com/brown-dash/Dash-Documentation). To edit the documentation simply clone this repo, edit the markdown files, and push those changes to the main branch. The files you need to edit are in the `markdown` folder. Each file corresponds to one page of the site and the folders correspond to groupings of pages into categories that can be seen in the dropdowns in the lefthand menu on the site. There are separate folders for documents (the different types of nodes), views (the different types of collections), and other features such as searching and linking. To add a new feature that we've worked on, just add a new .md file to the correct folder. Each file begins with a section like this which is used by [Jekyll](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll): ```python= --- layout: default title: Text parent: Documents # parent page in which this is nested (if applicable) permalink: /documents/text/ nav_order: 1 # order in which page appears in menu --- ``` :::info **Tips for good documentation**: - Include photos/GIFs that show how to use the feature - Keep explanations concise but thorough so that new users can learn how to use the feature - :::

    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