Giter VIP home page Giter VIP logo

findadoc-frontend's Introduction

Website Netlify Status GitHub License W3C Validation ESLint

Find a Doc JAPAN

Join our slack!

ko-fi

If you have more issues with submodules, please check out the wiki troubleshooting page

Getting started / Running the app

Install dependencies

yarn

Serve with hot reload at localhost:3000

yarn dev

Build for production and launch server

yarn build
yarn start

NOTE: To see current environment you are connected to, check the console logs.

For detailed explanation on how things work, check out Nuxt.js docs.

Internationalization (i18n)

Under the hood, this project uses nuxt/i18n and vue-i18n.

The locale files are managed through the localization repo and released as an npm package that can be updated. Here is the process for adding new translation keys:

  1. Clone the findadoc-localization repo
  2. Edit the locales/en.json to contain the new keys.
  3. If you know another language, feel free to add the same key and translation to the appropriate locale file. Omit if you don't know it; we use English as the fallback language so nothing will break.
  4. Make a pull request to the localization repo and wait for it to be merged to main
  5. Update the package inside package.json using yarn upgrade @ourjapanlife/findadoc-localization to get the latest keys imported
  6. Run yarn again
  7. Make your change in this repo with the new i18n keys and submit your PR 🎉

Troubleshooting

Make sure you have node v16.4.2 installed before installing the dependencies.

If you don't have it, the easiest way to manage node versions is by using nvm. Read the Install NVM guide.

After installing it, you need to install the correct node version:

nvm install 16.4.2

After the installation, just use it:

nvm use

findadoc-frontend's People

Contributors

2moon avatar amar-prabhu-29 avatar ann-kilzer avatar bridgetrosefitz avatar claudiofreitas avatar dependabot[bot] avatar ermish avatar imteekay avatar johannesfischer avatar johntitor2036 avatar jsoref avatar lana-lannister avatar mdboop avatar psychicnoodles avatar renderf0x avatar rossellafer avatar shoebsd31 avatar theyokohamalife avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

findadoc-frontend's Issues

Add ability to logout

Add ability to logout

  • New navbar menu item.
  • should show based on the state.user.isLoggedIn boolean
  • Add logout functionality.
  • It should redirect to appropriate page

Open questions:

Localize Table Headers

Copy the localization data to the table headers. The translations should be the same as those found in the add-clinic file.

Mobile screenshot:

Screen Shot 2021-06-16 at 9 43 51 PM (2)

Netlify Open Source Plan

We can get a free Open Source account if we meet the Netlify's requirements:

https://www.netlify.com/legal/open-source-policy

open source

  • Our current license is not in the list of supported licenses. I think BSD-4 is pretty rare... would we be open to choosing one from the list?
  • Remove the copyright mark from the footer (See #111 )

credit Netlify

  • Add a link to Netlify somewhere on the page. Usually the footer is a good spot. "You may create your own link, which should read “This site is powered by Netlify”, and include a link back to our home page." (See #111 )

Code of Conduct

  • "Features a Code of Conduct at the top level directory of the project repository or prominently in the documentation (with a link in the navigation, footer, or homepage)." 👉🏻 We can add one of the default ones via here

Apply

Post Approval

  • Configure it!

Create a 'Notes' feature

  • Create a column in the database to store a small memo about a clinic.
  • Clicking on an information icon should open a dialog for the user to read what it says.
    • An icon like mdi-alert-circle

Form Validation

  • The website field should validate that the input is a URL
  • All fields should be alphanumeric (? see below for discussion)

i18n workflow

  • add i18n repo as a submodule
  • configure i18n linters
  • update locale switcher to support new languages
  • Automate submodule update
  • Write troubleshooting doc for undoing accidental submodule checkins
  • Write script in submodule to auto-copy missing keys from en.json to other files
  • auto-generate the json for the locale selector
  • Wire in machine translation?
  • #195

open sourcing & security concerns

@theyokohamalife, you mentioned on Twitter that you'd like to open-source this, but had some security concerns.

I need to take a deeper look at Nuxt and Firebase to see what's up, but as I suspected, the tokens in the nuxt config are already sent down to the client. Anyone who opens up devtools could grab the apiKey. I don't see anything else in the repo that would be a sensitive key, so if these config values are OK (which I'm assuming they're fine since this is boilerplate Nuxt config stuff), then we should be OK.

here's how it ends up in the minified code:

var Et = {
          apiKey: "<removed>",
          authDomain: "<removed>",
          databaseURL: "<removed>",
          projectId: "<removed>",
          storageBucket: "<removed>",
          messagingSenderId: "<removed>
          appId: "<removed>",
          measurementId: "<removed>",
        },

So, if you still want to open source this, that should be possible, but we'd need to confirm the existing values exposed in the client are in fact not sensitive (I'm guessing it's fine but I haven't used Nuxt or Firebase before).

Implement Pagination for the cancellation table

The data set is small for now, but as it grows, this will become increasingly more valuable

  • Made data calls smaller which means
    • saves money (less data transferred)
    • faster UI response time
    • less js rendering on client side.

Split css from html 🔗

The css is currently inlined in the html.

We should split this out so it can be cached on the client side.

Make Alerts Closable

Users should be able to close the alerts that appear at the top of the page.

  • Create a variable to store the state of the alert? Might not be needed with vuetify
  • Update the current alert to one that can be closed

Screen Shot 2021-06-16 at 10 45 56 PM (2)

Hide Login navbar component if logged in

Hide Login navbar component if logged in.

  • Should hide the option if user is logged in
  • Should probably provide an admin option instead based on state.user.isLoggedIn

Set up CI/CD workflow on Git

We filed this one during the initial ticket generation, but given that Netlify does the publishing for us, is there anything missing?

Optimize bundle splitting

Nuxt is splitting the js code into a bunch of bundles. We should optimize this.

Dev Steps:

  • Identify optimal bundle split quantity for our app.
  • Create a vendor bundle for dependencies
  • (Optional) create a bundle for code that changes less frequently and can be cached.

Increase table header font size

Make the table header font slightly bigger so it's easier to read, but not too bad that it changes the layout of the table.

Screen Shot 2021-06-16 at 9 53 26 PM (2)

Set up toast notifications

We want to have a consistent design/ experience for notifications and user status messages.

  • decide what framework to use
  • implement it.
  • Decide on a style and position. (top left, red for errors, black for default, etc.)

Suggested UI fixes for Table

I have a few suggestions for the Table UI to better match Material UI styling

  1. Use the same button styling between the "flag" and "note", e.g. remove the blue border and have them both be icons only. Ensure that the icons are the same size and both from the Material set.
  2. "Click for more info" is a bit vague. Replace with the URL of the website (truncate to character limit and add '...' if too long)
  3. Replace the word "Flag" with "Report" (This requires an i18n change which now must be handled via the other repo)

COVID-19_Vaccination_Info

Update Search field label

  • Update the search field label to say Search by location or clinic name or something similar to help users.

Create a 'Flag' feature

  • Create a column with a flag button so users can report a post if it needs changes or to be removed.

Create a News section

Create a news section using Nuxt's CMS to share latest information in multiple languages.

Setup code owners

If/When we make this public, the codeowners feature will be enabled. Let's put the file back in that case

Create an admin cancellation table

We need an admin version of the cancellation table for moderating existing entries.

  • only available in admin page/logged in status
  • should have the same columns as the user-facing table
  • additional kebab/dango menu (separate github issue)
    • delete option
    • edit option

Chore / Cleanup: Move Locales list out of Toolbar script tag

Right now, the list of locales for the site menu exists directly in Toolbar.vue like so:

export default {
  data: () => ({
    drawer: null,
    locales: [
      { title: "العربية", value: "ar" },
      { title: "中文", value: "zh_CN" },
      { title: "Nederlands", value: "nl" },
      { title: "English", value: "en" },
      { title: "Filipino", value: "fil" },
      { title: "Français", value: "fr" },
      { title: "Deutsch", value: "de" },
      { title: "Bahasa Indonesia", value: "id" },
      { title: "Bahasa Melayu", value: "ms" },
      { title: "italiano", value: "it" },
      { title: "日本語", value: "ja" },
      { title: "한국어", value: "ko" },
      { title: "नेपाली", value: "ne" },
      { title: "Português", value: "pt" },
      { title: "Spanish", value: "es" },
      { title: "ไทย", value: "th" },
      { title: "Tiếng Việt", value: "vi" },
    ],
  }),

We should move this into the data/ directory as JSON and import here to separate data and logic.

Font assets are too large (icons)

As @ermish pointed out, we're loading about 500kb of fonts 😱 but it looks like there's just one offender: the material icons

image

Just glancing at the repo, it looks like these icons are loaded somewhere from the internals of Nuxt, but I'm not sure yet. For example, the Alert component has a little "i" icon, but that just seems to be a Nuxt component.

Add a Dashboard Button

An Admin Dashboard button should show in the nav drawer if an admin returns to the site and is still logged in.

Screen Shot 2021-06-19 at 1 58 37 PM

Move nuxt to static mode and add loading zones

This might improve client side perf, but we need to maintain a good user experience. To do this, we want to show "loading zones" (think when the page isn't loaded and there's an empty shell with a loading icon, until it's loaded)

Acceptance Criteria

  • Move nuxt to static mode
    This will make the UI load dynamically.
  • add loading zones
    Since the user may see sections loading async, we need nice loading visualizations before the table and content is rendered. Aka “loading zones”

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.