Giter Site home page Giter Site logo

open-genes / open-genes-frontend Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 10.0 18.64 MB

Open Genes is a database of human genes associated with aging and lifespan.

Home Page: https://open-genes.org/

License: Mozilla Public License 2.0

JavaScript 0.89% TypeScript 48.62% HTML 30.21% SCSS 19.57% CSS 0.08% MDX 0.63%
genetics aging angular biology biological-data biological-database science

open-genes-frontend's Introduction

DOI

Changelog

Open Genes — Frontend

Start locally

Before you start

Don't forget to install Angular CLI first

npm install -g @angular/cli

For more information please visit Angular official guide

npm i

Frontend

npm run start

https://localhost:3000/

Storybook

npm run storybook

https://localhost:6006/

IDE settings for development

Please install and set up the following plugins:

  • ESLint
  • Prettier
  • REST Client to support .http file extension which is used in a models folder (IDEA, VSCode)

Build and deploy

Build frontend

  • Developers stand test build: npm run build-dev
  • Demo stand build: npm run build-demo
  • Production AOT build: npm run build-prod

The bundle is being deployed with GitHub Actions. Workflow configs for each environment are here:

.github/workflows

Build storybook

npm run build-storybook

Storybook is being deployed with a special GitHub action you can enable in your repository settings.

open-genes-frontend's People

Contributors

bdf2ch avatar bhanu7755 avatar const8ine avatar isoboi avatar muzafarkosimov avatar naimhakimov avatar said4505 avatar yusupovm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

open-genes-frontend's Issues

Separate view for mobile search

Во время поиска отображается экран поиска.
В нем строка поиска всегда наверху, под ней половину экрана занимают подсказки. Ниже выводятся результаты поиска из таблицы.
Возможно их придется упростить, чтобы их не приходилось скроллить по горизонтали.

Develop Gene Ontology API service

This task has not yet been formulated properly.

Methods:

  • Obtain a diagram of the relationship of processes by GO id from GO CAM.

  • Get a list of genes by GO id of a process, function, or compartment

Reference links on a gene page — refactoring

Develop an Angular pipe or directive to transform text occurrences found with regexp in the description into links.

The description is a plain text value we get from the fields such as commentAging and commentEvolution with links inside square braces.

PubMed id (PMID/PMCID) examples:

PMID: [23509288]
PMCID: [PMC3531190]

DOI examples:

[10.1007/b136753]
[10.1007/978-3-540-46129-6]
[10.1002/jcp.24266]
[10.1073/pnas.1506538112]
[10.5551/jat.41335]
[https://doi.org/10.1007/b136753]
[http://doi.org/10.1007/b136753]

In parsed descriptions links also may come in round braces.
UniProt links format:
(PubMed: 21325134)

Refactor CSS on a Base level

  • Body and wrappers
  • Main layout blocks
  • Content should stay centered vertically if its height is smaller than viewport (use flexbox).
  • Close TODO's

Change detection bug in app-news-list component

Screenshot 2021-01-07 at 17 03 15

The skeleton loader is being shown endlessly (though PubMed API response is already retrieved) until Angular detects any changes and updates the view.

Steps to reproduce

  1. Open the main page
  2. Take a look at "Related articles on PubMed
    " block
  3. Change window size or click any button. The loader will disappear and you will see news titles.

Expected result

The loader should disappear right after the data is loaded.

Develop Notification service

Develop a singleton service to create and display notifications.

Methods

  • Create notification. Takes parameters: text (string), type (string to enum type: info, warning, success), buttonText (string).
  • Get the last notification. Use RxJS operators here.
  • Get an array of all notifications displayed before.

В поиске по Gene Ontology приходится два раза нажимать Enter

В поиске по Gene Ontology приходится два раза нажимать Enter в строке поиска чтобы отобразился список.

Воспроизведение:

  1. Перейти на https://open-genes.com/ На главной выбрать режим поиска «Аннотации GO»

Screen Shot 2022-06-06 at 16 45 01

2. Ввести запрос в поисковую строку. Например "cytokine".

Ожидаемый результат

Выдача поиска появится сразу

Фактический результат

Выдача поиска не отображается, пока пользователь не нажмет "Enter" или не кликнет на кнопку поиска второй раз.

Скорее всего это баг Change Detection.

При первом клике
Screen Shot 2022-06-06 at 16 37 58

При втором клике
Screen Shot 2022-06-06 at 16 38 12

Fix unused localization keys

  • Find all unused keys
  • Delete them in ru.json and en.json
  • Write a bash script to automate unused localization keys search in the project

Inject TranslationService right into AppComponent

TranslationService should be injected right into an AppComponent because it's used everywhere in the app.

  • Inject TranslationService right into AppComponent.
  • Remove its injection from the other components.

Develop Hint component

Click on a term in the article on a gene's page should trigger MatBottomSheet service and open a bottom sheet with a short reference on a term taken from
JSON file by key (similar to TanslationService). The hint should display a text in the selected language (English, Russian).

If there is no key specified, a component uses WikipediaApiService (see task) to retrieve a missing description.

Angular Material

Show a dummy page if user opens a website in IE11

Show a dummy page with the text "Your browser is outdated" if a user opens a website in IE11

Show a dummy page if a user opens a website on IE11.

  • The user should be unable to navigate the website, routing should not work.
  • Use IsIeService.
  • Use the layout for error blocks already presented in the app. Search for no-content class in the project and you will find it.

Example of .no-content block on the website
Screenshot 2021-01-08 at 00 00 39

Fix .no-content block width in Favorites

Steps to reproduce

  • Open open-genes.com/favorites
  • Clear Favorites if needed

Expected behavior

Block has .container class on it and width accordingly to grid container width.

Clickable gene functions on the gene page

When a user clicks one of the gene function badges in the gene page header, they should be redirected to the main page with the results in the list of the genes filtered by that gene function.

Screenshot 2021-03-20 at 13 43 26

Diseases associated with genes — main page

Output diseases by genes in a new data table on the main page or find the way to include them into the existing data table.
The main column is the name of the gene. Improve the filters so that genes in the data table can be sorted by a disease or a group of diseases.
Improve switching from one data table to another.

Check and fix: Components subscriptions and unsubscribe

Check and fix all components for unsubscribed subscriptions and unsubscribe.

Better use this pattern:

private ngUnsubscribe = new Subject();

// ...

  ngOnDestroy(): void {
    this.ngUnsubscribe.next();
    this.ngUnsubscribe.complete();
  }

Let's discuss if we should use a mixin for this.

Develop Wikipedia API service

Develop a service for making queries to Wikipedia public API.

Methods:

  • Show a short text description of a given term.
    Takes parameters: term (string), language (string to enum type)

Fonts and images preload

  • Add static images preload and fonts preload to src/index.html using link rel="preload"

  • Check existing links and fix them if it's needed.

Check and fix: A11y

We have to improve accessibility on the website. Let's discuss if anything is missing on a checklist.

  • Add alt attribute to img
  • Add aria attributes
  • Check navigation with the Tab key — does it work and do users see a frame on the focused element while navigating. Fix it.

Favorites counter in the main menu doesn't update until the page reload

The favorites counter in the main menu doesn't update until the page reload.
This bug is related to change detection of the menu component.

Steps to reproduce:

  1. On a home page click on the gene menu in the list.
  2. Click "Add to Favorites".
  3. Open the main menu

Expected result:

The counter on the menu item shows a number of genes added to Favourites.

Познакомиться с рабочим процессом

Работа над задачей

  1. До того, как вы приступите к задаче, обратите внимание, что в проекте используются линтеры ESLint и Prettier, а также есть .editorconfig.
    В вашей IDE пожалуйста укажите пути к их конфигурационным файлам:
  • tsconfig.json
  • .prettierrc.json
  • .editorconfig
  1. Сделайте форк репозитория.

Screen Shot 2022-06-06 at 17 18 38

  1. Создайте новую ветку от ветки develop. Ветка именуется по номеру задачи (например: 194 или 193-fix-change-detection-bug).

Screen Shot 2022-06-06 at 17 10 51

  1. Протестируйте результат, прежде чем закончите работу над задачей. Коммиты мы обычно пишем на английском, формат примерно такой:
193. Fix change detection bug in GO search

Убедительно просим вас избегать названий коммитов типа fix bug.

  1. Когда задача готова, запушьте изменения на свою ветку. Создайте PR от своей ветки в ветку develop. 3. По возможности ведите обсуждение задачи на странице пулл реквеста.

  2. Ответственный за проект делает мердж в develop, если все хорошо. Если возникнут вопросы, во время код ревью вас могут попросить что-то исправить или доработать.

Detect the user's language

Develop a service that interacts with TranslateService to detect the browser language and set the corresponding language. Now we have only two languages (English, Russian).

Remove Font Awesome legacy

Get rid of Font Awesome, which takes a few extra fonts and a lot of CSS into the bundle.

Use the new app-icon component and SVG sprites in places where FA is currently used.

Add new SVG sprites to the sprite sheet instead of old FA analogs.

Add documentation for building sprite sheets.

Работа по данным проекта?

Извините, что не в тему. Но не нашел другого места куда написать.
Есть ли возможности как-то взаимодействовать с проектом open-genes в части работы с данными по генам? А то в РТД чате ставят в упрек, что мы пилим что-то свое и не думаем о помощи проектам Open Longevity.
Действительно, надо, как минимум, спросить. Проект ведь у вас замечательный. Может как-то реально помочь, в меру сил и компетенций?

Не работают легенда и тултип у диаграмы

На ветке OG-864 в компоненте IntersectionPageComponent есть дочерний компонент ChartComponent, который отрисовывает диаграму с пересекающимися кругами по входным данным. Судя по документации библиотеки Chart.js (используется плагин https://github.com/upsetjs/chartjs-chart-venn), которая импортируется в компоненте ChartComponent, при клике на круг должен появляться тултип. Также по умолчанию должна отображаться легенда. Но кажется что Angular не отрисовывает тултип и легенду.

Ожидаемый результат

Тултип отображается при клике не пересечение кругов как на скриншоте из документации. Сверху диаграмы отображается легенда — цветные прямоугольники с подписями.
image

Фактический результат

Тултип и легенда не отображаются.

Represent a field "descriptionNCBI"

Represent a descriptionNCBI field on a gene page.
The task should be done after geneticists complete their task for Russian descriptions.

After updating locales, web app pages are broken until hard reload

After updating styles or localization keys, web app pages are broken until the user performs a hard reload.

Steps to reproduce

  1. Add a localization key, use it on any page
  2. Deploy an app
  3. Open any page where the changes were made

Expected result

The page or resources shouldn't be cached, it should be up-to-date.

Actual result

Screenshot 2021-01-08 at 21 52 03

Не отображается блок «Не найдено» в поиске по исследованиям

  1. При поиске по исследованиям, если ничего не найдено, не отображается блок «Не найдено». Вместо него пустота.
  2. Также срабатывает какой-то ивент и при клике в любую область выдачи поиска обновляется view.

Шаблон компонента: src/app/pages/researches/components/research-tab/research-tab.component.html

Воспроизведение

  1. Перейти на https://open-genes.com/researches
  2. Выбрать любую вкладку, ввести любой поисковый запрос вместо названия генов, по которым осуществляется фильтрация

Ожидаемый результат

Screen Shot 2022-06-23 at 21 36 33

Фактический результат

Screen Shot 2022-06-23 at 20 25 32

Не отображается блок «Не найдно». При любом клике шаблон возвращается в исходное состояние.

Unit testing

We should cover a project with tests on Jasmine.

  • Write unit tests for all components and modules
  • Write unit tests for all services

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.