Skip to content

Commit

Permalink
Merge branch 'main' into adding-header-to-homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
arodidev authored Apr 3, 2024
2 parents 67753b4 + 06ba397 commit d3c6214
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Requirements

- [ ] This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
- [ ] My work conforms to the [**OpenMRS 3.0 Styleguide**](https://om.rs/styleguide) and [**design documentation**](https://zeroheight.com/23a080e38/p/880723-introduction).
- [ ] My work conforms to the [**OpenMRS 3.0 Styleguide**](https://om.rs/styleguide) and [**design documentation**](https://om.rs/o3ui).
- [ ] I checked for feature overlap with [**existing widgets**](https://om.rs/directory).


Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
TURBO_TEAM: ${{ github.repository_owner }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -36,7 +36,7 @@ jobs:
run: yarn

- name: Setup local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
uses: felixmosh/turborepo-gh-artifacts@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -137,7 +137,7 @@ jobs:

steps:
- name: Trigger RefApp Build
uses: fjogeleit/http-request-action@master
uses: fjogeleit/http-request-action@v1
with:
url: https://ci.openmrs.org/rest/api/latest/queue/O3-BF
method: "POST"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tx-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
token: ${{ secrets.TRANSIFEX_TOKEN }}
args: pull --force --all
- name: Create PR if necessary
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6.0.1
with:
commit-message: "(chore) Update translations from Transifex"
title: "(chore) Update translations from Transifex"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
:wave: *New to our project? Be sure to review the [OpenMRS 3 Frontend Developer Documentation](https://openmrs.github.io/openmrs-esm-core/#/). You may find the [Map of the Project](https://openmrs.github.io/openmrs-esm-core/#/main/map) especially helpful.* :teacher:
:wave: *New to our project? Be sure to review the [OpenMRS 3 Frontend Developer Documentation](https://o3-docs.openmrs.org/docs/introduction).

![Node.js CI](https://github.com/openmrs/openmrs-esm-home/workflows/Node.js%20CI/badge.svg)
![Node.js CI](https://github.com/openmrs/openmrs-esm-home/actions/workflows/node.js.yml/badge.svg)

# OpenMRS ESM Home

An [OpenMRS Microfrontend](https://wiki.openmrs.org/display/projects/Frontend+-+SPA+and+Microfrontends) for frontend modules tied to the home page.
An [OpenMRS Microfrontend](https://openmrs.atlassian.net/wiki/spaces/projects/pages/26936899/OpenMRS+3.0+A+Frontend+Framework+that+enables+collaboration+and+better+User+Experience) for frontend modules tied to the home page.

## What is this?

Expand All @@ -15,8 +15,8 @@ It is responsible for rendering the UI for the landing page after the user logs

## Contributing / Development

[Setup local development environment for OpenMRS SPA](https://wiki.openmrs.org/display/projects/Setup+local+development+environment+for+OpenMRS+SPA)
[Setup local development environment for OpenMRS SPA](https://o3-docs.openmrs.org/docs/frontend-modules/development)

## Design Patterns

For documentation about our design patterns, please visit our [design system](https://zeroheight.com/23a080e38/p/880723--introduction) documentation website.
For documentation about our design patterns, please visit our [design system](https://om.rs/o3ui) documentation website.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openmrs/esm-home",
"version": "5.2.2",
"version": "5.2.3",
"workspaces": [
"packages/*"
],
Expand All @@ -11,7 +11,7 @@
"ci:publish": "yarn workspaces foreach --all --topological --exclude @openmrs/esm-home npm publish --access public --tag latest",
"ci:prepublish": "yarn workspaces foreach --all --topological --exclude @openmrs/esm-home npm publish --access public --tag next",
"release": "yarn workspaces foreach --all --topological version",
"prettier": "prettier --config prettier.config.js --write \"packages/**/*.{ts,tsx}\"",
"prettier": "prettier --config prettier.config.js --write \"packages/**/*.{ts,tsx}\" --list-different",
"postinstall": "husky install",
"start": "openmrs develop --sources 'packages/esm-*-app/'",
"verify": "turbo lint typescript test"
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-home-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openmrs/esm-home-app",
"version": "5.2.2",
"version": "5.2.3",
"description": "Homepage microfrontend for the OpenMRS SPA",
"browser": "dist/openmrs-esm-home-app.js",
"main": "src/index.ts",
Expand Down Expand Up @@ -36,7 +36,7 @@
"url": "https://github.com/openmrs/openmrs-esm-home/issues"
},
"peerDependencies": {
"@openmrs/esm-framework": "4.x",
"@openmrs/esm-framework": "5.x",
"react": "18.x",
"react-i18next": "11.x",
"react-router-dom": "6.x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ExtensionSlot } from '@openmrs/esm-framework';
import styles from './dashboard-view.scss';

const DashboardView: React.FC<{ dashboardSlot: string; title: string }> = ({ dashboardSlot, title }) => {
return <ExtensionSlot className={styles.dashboardView} name={dashboardSlot} state={{ dashboardTitle: title }} />;
return <ExtensionSlot className={styles.dashboardView} name={dashboardSlot} state={{ dashboardTitle: title }} />
};

export default DashboardView;
4 changes: 2 additions & 2 deletions packages/esm-home-app/src/dashboard/home-dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
display: flex;
flex-direction: column;
margin: 0;
// Full vertical height minus the primary navigation menu height
// Full vertical height minus the primary navigation menu height
height: calc(100vh - 3rem);
margin-left: 16rem;
background-color: colors.$white-0;
background-color: colors.$gray-10;

& a {
width: 100%;
Expand Down
4 changes: 3 additions & 1 deletion packages/esm-home-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export const homeWidgetDashboard = getSyncLifecycle(homeWidgetDashboardComponent

export const pageHeader = getAsyncLifecycle(() => import('./page-header/page-header.component'), options);

export const metrics = getAsyncLifecycle(() => import('./metrics/metrics.component'), options);

export function startupApp() {
defineConfigSchema(moduleName, esmHomeSchema);
// t('Home', 'Home');
Expand All @@ -36,4 +38,4 @@ export function startupApp() {
title: () => Promise.resolve(window.i18next.t('Home', { defaultValue: 'Home', ns: moduleName })),
},
]);
}
}
9 changes: 9 additions & 0 deletions packages/esm-home-app/src/metrics/metrics.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { ExtensionSlot } from '@openmrs/esm-framework';
import React from 'react';
import styles from './metrics.scss';

const Metrics: React.FC = () => {
return <ExtensionSlot className={styles.metrics} name="home-metrics-tiles-slot" />;
};

export default Metrics;
3 changes: 3 additions & 0 deletions packages/esm-home-app/src/metrics/metrics.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.metrics {
display: flex;
}
5 changes: 5 additions & 0 deletions packages/esm-home-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"name": "page-header",
"slot": "home-dashboard-slot",
"component": "pageHeader",
},
{
"name": "metrics-slot",
"slot": "home-dashboard-slot",
"component": "metrics",
"online": true,
"offline": true
},
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3305,7 +3305,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@openmrs/esm-home-app@workspace:packages/esm-home-app"
peerDependencies:
"@openmrs/esm-framework": 4.x
"@openmrs/esm-framework": 5.x
react: 18.x
react-i18next: 11.x
react-router-dom: 6.x
Expand Down Expand Up @@ -11001,9 +11001,9 @@ __metadata:
linkType: hard

"ip@npm:^2.0.0":
version: 2.0.0
resolution: "ip@npm:2.0.0"
checksum: 1270b11e534a466fb4cf4426cbcc3a907c429389f7f4e4e3b288b42823562e88d6a509ceda8141a507de147ca506141f745005c0aa144569d94cf24a54eb52bc
version: 2.0.1
resolution: "ip@npm:2.0.1"
checksum: d6dd154e1bc5e8725adfdd6fb92218635b9cbe6d873d051bd63b178f009777f751a5eea4c67021723a7056325fc3052f8b6599af0a2d56f042c93e684b4a0349
languageName: node
linkType: hard

Expand Down

0 comments on commit d3c6214

Please sign in to comment.