GithubHelp home page GithubHelp logo

sledilnik / zdravniki Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 8.0 5.08 MB

Website for showing doctors' availability in Slovenia - https://zdravniki.sledilnik.org/

Home Page: https://zdravniki.sledilnik.org

HTML 0.87% JavaScript 98.68% CSS 0.35% Dockerfile 0.10%
react slovenia slovenija healthcare doctors doctors-information doctors-tracker doctors-density

zdravniki's Introduction

Zdravniki - available doctors in Slovenia

Build and deploy (production) Build and deploy (staging) Stanje prevoda

Develop

For setting up development environment locally run:

  1. Install depenencies
    yarn install
    
  2. ...TODO

Data source

See .csv files in the csv/ directory of zdravniki-data repository.

Translations

We use Weblate translation service. Your contributions are welcome.

Current translation status:

Stanje prevoda

Libraries

Notable:

All used libraries can be seen on GitHub dependancies.

Linting

CLI Usage

yarn lint

If you also want to automatically fix the project errors:

yarn lint --fix

IDE Usage

VSCode

Have a look at step 3 of this article from DigitalOcean

WebStorm

image

Tests

Unit Tests

Runs unit tests.

yarn test:unit

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

E2E Tests

Documentation: Playwright VS Code extension

Runs the end-to-end tests.

yarn playwright test

or

yarn test:e2e

Other helpful cli commands:

Starts the interactive UI mode

yarn playwright test --ui

Runs the tests only on Desktop Chrome

yarn playwright test --project=chromium

Runs the tests in a specific file.

yarn playwright test example

Runs the tests in debug mode.

yarn playwright test --debug

Auto generate tests with Codegen.

yarn playwright codegen

Generic React App instructions (to be removed or minimized)

This project was bootstrapped with Create React App.

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

yarn build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

zdravniki's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zdravniki's Issues

Console errors

On current master branch, doctor card button is misaligned (regarding to phone and location button) and there are bunch of console errors:
errors

Filter by doctor type: add pediatrician

We should change controls for doctor type selector to have 4 options:

  1. GP - Družinski zdravnik
  2. Pediatrician - Pediater
  3. Dentist - Zobozdravnik
  4. Gynecologist - Ginekolog

We should offer selection of sub-type (Adults/Youth/Students) only for Dentists

For Pediatrician use existing Youth icon
image

Support multiple phone numbers

Some doctors have multiple phone numbers listed with , as separator: we should present this as two numbers with tel: shema URL
image

Markdown bugs

  • When a paragraph starts with <span>..</span>, it doesn't treat <span>..</span> as part of a paragraph
  • Support markdown in title html attribute

Limit map bounds

Limit min & max latitude and longitude so that user doesn't accidentally wander too far off into the dangerous areas without doctors.

Filter loses sync with current language

After some navigating the filter element is not switching the language anymore

  1. visit Home page
  2. About (via menu)
  3. Switch language, eg to English in language dropdown
  4. Home page (via menu)
  5. Switch language, back eg to Slovenian in language dropdown
  6. End up with mix:
    image

Empty list when no search result

image

bug: Missing footer, which normally looks like:
image

Optional feature: there could be a "No results, try adjusting your filter or search in whole map" with possibly the "search in whole map" resetting the map zoom and position.

Map attribution out of view

The bottom edge of the map is out of the desktop viewport, making the attributions almost invisible:
image

Also note, we don't strictly need to attribute Leaflet, just OpenStreetMap.

Implement linting

@stefanb @lukarenko @miaerbus @mihaerzen @overlordtm @bananica
First of all I would like to thank you all for your contribution so far and that you are patient with me :).

Before I or someone else really tackle #24 and #30 I would like to have code as clean as possible in given moment. I am afraid of large number of conflicts. The second reason is very annoying. Switching between linting and other branches requires, at least from my experience, deleting /node_modules and re-installing them and I would really love to have linting enabled.

Unless there is better way, I suggest that we merge all open PRs, even thou they might not completely solve issues or implement new features. Apply linting and then continue.

If we decide so, @mihaerzen, when should we turn on rules that are currently turned off? I assume immediately after previously rule is applied. And after all rules are applied we should continue with fixing issues and implementing new features. Will it take too long to apply all the rules? What would you do?

List, popup: Useless link on institution name

Link on institution name to institution webpage in providers list is not active anymore since clicking anywhere takes the user to the doctor card.
image
Same in map popup.

Not sure if this is intended or not.
If so remove the link from the institution name, otherwise make the link work if user clicks/taps it.

Doctors page: zoom and quotient

Screenshot 2021-12-05 at 12 18 16

Glavarinski količnik should not be shown next to availability % - it is linked to accepts/reject.

I suggest that we show these in two lines:

  • Accepts/Rejects
  • Availability %

Zoom on the map should show street-level and we should allow zoom in/out controls (but no pan of map?)

Cluster marker colors are misleading

Cluster markers use green/yellow/red to encode the size of the cluster, which interferes with individual doctors’ markers that use green and red for ne/sprejema.

I suggest using a different color scheme for clusters, e.g.:

  • all clusters are blue regardless of size; or
  • clusters are colored using average of ne/sprejema for all doctors inside (green if all doctors are available, red if none of them are, yellow-orange in between)

Linting and prettier

Hi!

I went ahead and had a look at some of the pull requests. The first thing I noticed is there are different coding styles used between different authors. As this is an open-source project which will hopefully have many contributors I would suggest adding some linting to enforce a certain coding style. I believe this will increase readability and make pull request reviews easier.

Personally, I would vote to adopt eslint airbnb-typescript as I think it fits what I have seen in the code so far. I would also add this to the CI so it will run when pull request is created.

Let me know what you think!

Thank you for your amazing contributions so far! 👏🏼

Search also in institution name

...and possibly other available fields

Eg searching for "dent" yields no results when searching for dentists even if it appears in many providers' names.

Mechanism for accepting structured corrections

In addition to #84 we could make the process easier to moderate.

For accepting and fixing errors in the data of specific doctors a gform could be more useful:

  • linked on doctor's detail page
  • automagically prefilled all current data
  • input fields for correct data
  • saved to Google sheet
  • moderator reviews and approves/rejects the change in a separate column in the gsheet
  • data project takes the approved rows from gsheet to CSV
  • data project merges the CSV with data from ZZZS, overriding invalid data

Originally posted by @stefanb in #84 (comment)

Change of filters should not reset zoom of map

I find it annoying that zoom-out happens every time I change the filter.

I think if user did zoom-in, we should respect this and only show results matching the map.

Click on ZDRAVNIKI logo could reset zoom (like go-home)

Trim down data loaded into browsers

Check which columns from https://github.com/sledilnik/zdravniki-data/tree/main/csv are not used and either use them (eg in search) or remove them from cvs

dict-institutions.csv:

  • id_inst
  • zzzsSt (will become a key, when we manage to match everything)
  • name
  • unit ?
  • address
  • post
  • city
  • municipality ?
  • lat,lon
  • phone
  • website

We could also add statistical region name if needed.

doctors.csv:

  • id (synthetic id, not really useful, best to not use it and remove it from CSV)
  • doctor
  • type
  • accepts
  • availability
  • load
  • id_inst

Map tooltip show and hides on mobile/narrow screen or is partially visible

If marker's tooltip height is near map height, tooltip pushes marker outside the map and consequently disappears (fully zoomed in).

Steps to recreate:

  1. go mobile or narrow screen (viewport height around 590px)
  2. find "Ribič Bojan"
  3. click on marker icon in doctor card (it will fully zoom in and position marker in center.
  4. try to get tooltip

Video was recorded on iPhone SE 2.

tooltip-too-big.mp4

When map is zoomed out then due to map max bounds tooltip pushes marker down trying to fit on the map and then marker snaps back and tooltip is not fully visible.

Steps to recreate:

  1. steps 1 - 3 from previous (viewport height around 736px - iPhone 6,7,8 plus)
  2. fully zoom out
  3. try to get tooltip

localhost_3000_sl(iPhone 6_7_8 Plus) (1)

iPad , Safari and Chrome issue in landscape

When taping on the map, user enters a "view" where only reload of the whole page exits from that view.
Zoom out pinch does not help.
In portrait it works fine as it works on handsets.
Examples of the view before and after taping on the map in Safari on iPad.
image
image

Rgds,
Kesma

Provide links to doctors' cards

Currently the business card icon is implemented using HTML <button> element, making it less likely for crawlers to click.

For better discoverability by crawlers it should either become a HTML link (<a href=....>) or we should provide a sitemap.xml file.

Improved tooltip for doctor

The new design looks great. We only need to now improve the looks of tooltip to match the new design (Sprejema, doctor type...). Also, we need to add at least a button to go to Doctor page as this is very useful for mobile, to go directly to doctor page from the map (default) view (which does not show cards anymore)

image

Missing SEO metadata

TODO:

  • meta title and description with sane hardcoded defaults
  • opengraph title and description with sane hardcoded defaults
  • meta title and description localized in runtime with translations
  • opengraph title and description localized in runtime with translations
  • canonical links pointing to same URL but on production hostname zdravniki.sledilnik.org with all query string and hash striped (remove everything after ? or # inclusive
  • hreflang links between same pages in different languages (language part of the url replaced with target language, cleaned of varying parts as above)

Preserve current filter in URL

Preserve all search parameters, including current map position & zoom in the URL hash.

Specifically:

Empty menu stays open after window resize

  1. Open any page in a narrow screen
  2. open the hamburger menu
  3. resize the page to desktop size
  4. menu stays open on the right, with no options:
    image

User can click left of the menu to close it and use the menu options in the top bar

Report error improvements

  • Input fields validation
  • we should probably add icon (maybe a flag 🏴 by @bananica) on search result. When clicked, we could simply open doctor page in report error mode.
  • I would add free-form entry of additional Note where user can write freely what is wrong. For example "doctor is currently on maternity leave and does not accept patients"
  • if we have Flag to report problem on each search results, then we can remove Prijavi napako from navigation bar
  • we need type of doctor in the form results, as some doctors are working in multiple setups (adults and youth)

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.