Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) O3-3890 Help menu (and menu items) should use a standard Carbon… #1164

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c470659
(fix) O3-3891: Adjust Change Language Modal Size to Small
Samstar10 Sep 24, 2024
675378a
(fix) O3-3891: Adjust Change Language Modal Size to Small
Samstar10 Sep 24, 2024
700b47b
(fix) O3-3891: Adjust Change Language Modal Size to Small
Samstar10 Sep 24, 2024
26d30e5
(fix) O3-3891: Adjust Change Language Modal Size to Small
Samstar10 Sep 24, 2024
1df72a9
(fix) O3-3890 Help menu (and menu items) should use a standard Carbon…
Samstar10 Sep 26, 2024
2a25a9d
(fix) O3-3890 Help menu should use carbon design standards
Samstar10 Oct 17, 2024
cc86b33
(fix) remove the change language link file.
Samstar10 Oct 22, 2024
5d49bc0
(fix) O3-3891: Adjust Change Language Modal Size to Small (#1162)
Samstar10 Sep 24, 2024
a69def6
(feat) O3-4018: Add Information and checkmarkFilled icons to the styl…
usamaidrsk Sep 25, 2024
83bd341
(chore) Update translations from Transifex (#1086)
github-actions[bot] Sep 26, 2024
41bb523
(fix) Fix merging configuration files to properly call readFile
ibacher Sep 26, 2024
8c36d9f
(fix) Pass patient object to the banner action buttons (#1158)
vasharma05 Sep 26, 2024
9be3a43
(feat) O3-3774: Add implementation for the Nav Group (#1116)
hadijahkyampeire Sep 29, 2024
64abbff
(chore) Update translations from Transifex (#1165)
github-actions[bot] Sep 29, 2024
42e3b62
(chore) Update translations from Transifex (#1167)
github-actions[bot] Sep 30, 2024
30c81fe
(chore) O3-4018: Add checkmarkFilled and information icons mocks (#1166)
usamaidrsk Sep 30, 2024
efb7351
(chore) O3-4011 - refactor patient banner to have patient identifiers…
chibongho Sep 30, 2024
1846ee0
(refactor) Refactor REST API calls to reuse restBaseUrl (#1168)
denniskigen Oct 2, 2024
6946eae
fix CheckmarkFilled icon registration (#1170)
usamaidrsk Oct 3, 2024
fe432a0
(fix) fix checkmark filled icon (#1171)
usamaidrsk Oct 3, 2024
15ccea3
(fix) fix checkmark filled icon (#1172)
usamaidrsk Oct 3, 2024
0c5ed99
(fix) Translation overrides should only apply to the specified language
ibacher Oct 3, 2024
40879f5
(fix) O3-4018: Fix checkmarkFilled icon and remove broken information…
ibacher Oct 3, 2024
8034703
(fix) O3-4018: Add fixed Information icon set
ibacher Oct 3, 2024
c002d8a
(fix) O3-4018: Add icon docs
ibacher Oct 3, 2024
798f29a
(feat) Add variable name extractor to expression runner (#1173)
ibacher Oct 3, 2024
2472b81
(chore) Update TX configuration for merged translations\n
ibacher Oct 4, 2024
1305ecf
(chore) Update translations from Transifex (#1169)
github-actions[bot] Oct 7, 2024
7fbd81f
(BREAKING) Retire concept of ConnectedExtension (#1154)
ibacher Oct 7, 2024
03c4540
(fix) Expression evaluator should use typeof not instanceof to detect…
samuelmale Oct 8, 2024
9dc2ada
(fix) useAssignedExtensions should not return undefined
ibacher Oct 8, 2024
84c2bf7
(feat) add CheckmarkOutlineIcon (#1176)
usamaidrsk Oct 10, 2024
d6eb647
(feature) O3-3859 Ability to customize or add logos at the bottom of …
suubi-joshua Oct 14, 2024
5bc90c2
(chore) Update translations from Transifex (#1175)
github-actions[bot] Oct 15, 2024
071d83f
(fix) Fix docstring for extractVariableNames (#1178)
brandones Oct 15, 2024
f3dd5de
(fix) O3-3888: Tweak help menu hover state (#1179)
elishabantana Oct 16, 2024
bd6f8ec
(test) O3-4011 - add mock for PatientBannerPatientIdentifier (#1181)
chibongho Oct 17, 2024
3d49273
(fix) O3-3891: Adjust Change Language Modal Size to Small
Samstar10 Sep 24, 2024
9122f78
(fix) O3-3890 Help menu should use carbon design standards
Samstar10 Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
[main]
host = https://www.transifex.com

[o:openmrs:p:openmrs-esm-core:r:esm-implementer-tools-app]
[o:openmrs:p:openmrs3:r:esm-implementer-tools-app]
file_filter = packages/apps/esm-implementer-tools-app/translations/<lang>.json
source_file = packages/apps/esm-implementer-tools-app/translations/en.json
source_lang = en
type = KEYVALUEJSON
replace_edited_strings = false
keep_translations = false

[o:openmrs:p:openmrs-esm-core:r:esm-login-app]
[o:openmrs:p:openmrs3:r:esm-login-app]
file_filter = packages/apps/esm-login-app/translations/<lang>.json
source_file = packages/apps/esm-login-app/translations/en.json
source_lang = en
type = KEYVALUEJSON
replace_edited_strings = false
keep_translations = false

[o:openmrs:p:openmrs-esm-core:r:esm-offline-tools-app]
[o:openmrs:p:openmrs3:r:esm-offline-tools-app]
file_filter = packages/apps/esm-offline-tools-app/translations/<lang>.json
source_file = packages/apps/esm-offline-tools-app/translations/en.json
source_lang = en
type = KEYVALUEJSON
replace_edited_strings = false
keep_translations = false

[o:openmrs:p:openmrs-esm-core:r:esm-primary-navigation-app]
[o:openmrs:p:openmrs3:r:esm-primary-navigation-app]
file_filter = packages/apps/esm-primary-navigation-app/translations/<lang>.json
source_file = packages/apps/esm-primary-navigation-app/translations/en.json
source_lang = en
type = KEYVALUEJSON
replace_edited_strings = false
keep_translations = false

[o:openmrs:p:openmrs-esm-core:r:esm-translations]
[o:openmrs:p:openmrs3:r:esm-translations]
file_filter = packages/framework/esm-translations/translations/<lang>.json
source_file = packages/framework/esm-translations/translations/en.json
source_lang = en
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import styles from './styles.scss';
import { ArrowUpRight } from '@carbon/react/icons';
import { ArrowUpRight } from '@carbon/react/icons'
import { Link } from '@carbon/react';

const ContactUs = () => {
const { t } = useTranslation();
return (
<Link
className={styles.helpButton}
style={{ textDecoration: 'none' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should move to styles.scss.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denniskigen for some reason whenever I move this to the styles.css it does not work. This is the only way it works.

href="https://talk.openmrs.org"
rel="noopener noreferrer"
renderIcon={ArrowUpRight}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import styles from './styles.scss';
import { ArrowUpRight } from '@carbon/react/icons';
import { ArrowUpRight } from '@carbon/react/icons'
import { Link } from '@carbon/react';

const Docs = () => {
const { t } = useTranslation();
return (
<Link
className={styles.helpButton}
style={{ textDecoration: 'none' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

href="https://o3-docs.openmrs.org"
rel="noopener noreferrer"
renderIcon={ArrowUpRight}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import styles from './styles.scss';
import { ArrowUpRight } from '@carbon/react/icons';
import { ArrowUpRight } from '@carbon/react/icons'
import { Link } from '@carbon/react';

const ReleaseNotes = () => {
Expand All @@ -10,6 +10,7 @@ const ReleaseNotes = () => {
return (
<Link
className={styles.helpButton}
style={{ textDecoration: 'none' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

href="https://o3-docs.openmrs.org/docs/changelog"
rel="noopener noreferrer"
renderIcon={ArrowUpRight}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
@use '@carbon/layout';
@use '@carbon/type';
@use '@carbon/colors';
@import '~@openmrs/esm-styleguide/src/vars';

.helpButton {
display: flex;
align-items: center;
justify-content: space-between;
padding: layout.$spacing-03;
color: black !important;
&:focus {
outline: none;
}
}

.helpButton:hover {
background: colors.$gray-10-hover;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import styles from './help-popup.styles.scss';
import React from 'react';
import { ExtensionSlot } from '@openmrs/esm-framework';
import styles from './help-popup.styles.scss';

export default function HelpMenuPopup() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
flex: auto;
bottom: 2rem;
right: 3rem;
width: 11rem;
width: 12rem;
z-index: 8000;
background-color: $ui-02;
gap: spacing.$spacing-05;
Expand All @@ -22,10 +22,8 @@

.helpextension {
margin: spacing.$spacing-04;
padding: spacing.$spacing-01;
cursor: pointer;
text-align: left;
display: flex;
flex-direction: column;
gap: spacing.$spacing-05;
}
12 changes: 7 additions & 5 deletions packages/apps/esm-help-menu-app/src/help-menu/help.component.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState, useEffect, useRef } from 'react';
import classNames from 'classnames';
import { Help } from '@carbon/react/icons';
import HelpMenuPopup from './help-popup.component';
import styles from './help.styles.scss';
import { Help } from '@carbon/react/icons';

export default function HelpMenu() {
const [helpMenuOpen, setHelpMenuOpen] = useState(false);
Expand All @@ -14,7 +14,7 @@ export default function HelpMenu() {
};

useEffect(() => {
const handleClickOutside = (event) => {
const handleClickOutside = (event: MouseEvent) => {
if (
helpMenuButtonRef.current &&
!helpMenuButtonRef.current.contains(event.target) &&
Expand All @@ -24,12 +24,14 @@ export default function HelpMenu() {
setHelpMenuOpen(false);
}
};
document.addEventListener('click', handleClickOutside);

window.addEventListener(`mousedown`, handleClickOutside);
window.addEventListener(`touchstart`, handleClickOutside);
return () => {
document.removeEventListener('click', handleClickOutside);
window.removeEventListener(`mousedown`, handleClickOutside);
window.removeEventListener(`touchstart`, handleClickOutside);
};
}, [helpMenuOpen]);
}, []);

return (
<>
Expand Down
12 changes: 10 additions & 2 deletions packages/apps/esm-help-menu-app/src/help-menu/help.styles.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@use '@carbon/colors';
@use '@carbon/layout';

.helpMenuButton {
z-index: 7900;
background-color: white;
height: 2.5rem !important;
width: 2.5rem !important;
bottom: 1rem;
bottom: layout.$spacing-05;
position: fixed;
display: flex;
justify-content: center;
Expand All @@ -13,5 +16,10 @@
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.1),
0 1px 2px -1px rgba(0, 0, 0, 0.1);
border-radius: 2rem;
border-radius: layout.$spacing-03;

&:hover {
background-color: colors.$gray-20;
cursor: pointer;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Root from './root.component';
import { render } from '@testing-library/react';
import Root from './root.component';

describe(`<Root />`, () => {
it(`renders without dying`, () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/apps/esm-implementer-tools-app/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ module.exports = {
},
setupFilesAfterEnv: ['<rootDir>/setup-tests.ts'],
moduleNameMapper: {
'lodash-es': 'lodash',
'^lodash-es$': 'lodash',
'^lodash-es/(.*)$': 'lodash/$1',
'\\.(s?css)$': 'identity-obj-proxy',
'@openmrs/esm-framework': '@openmrs/esm-framework/mock.tsx',
dexie: require.resolve('dexie'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useConceptLookup, useGetConceptByUuid } from './interactive-editor/valu
const mockUseConceptLookup = useConceptLookup as jest.Mock;
const mockUseGetConceptByUuid = useGetConceptByUuid as jest.Mock;

jest.mock('lodash-es/debounce', () => jest.fn((fn) => fn));
jest.mock('./interactive-editor/value-editors/concept-search.resource', () => ({
useConceptLookup: jest.fn().mockImplementation(() => ({
concepts: [],
Expand Down
22 changes: 12 additions & 10 deletions packages/apps/esm-implementer-tools-app/translations/am.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
{
"activeItemSourceText": "The current value comes from ",
"backendModules": "Backend Modules",
"backendModules": "Backend modules",
"checkImplementerToolsMessage": "Check the Backend Modules tab in the Implementer Tools for more details",
"clearConfig": "Clear Local Config",
"clearConfig": "Clear local config",
"close": "Close",
"configuration": "Configuration",
"description": "Description",
"downloadConfig": "Download Config",
"downloadConfig": "Download config",
"edit": "Edit",
"editValueButtonText": "Edit",
"enabled": "Enabled",
"extensions": "Extensions",
"featureFlag": "Feature Flag",
"featureFlags": "Feature Flags",
"frontendModules": "Frontend Modules",
"installedVersion": "Installed Version",
"featureFlag": "Feature flag",
"featureFlags": "Feature flags",
"frontendModules": "Frontend modules",
"installedVersion": "Installed version",
"itemDescriptionSourceDefaultText": "The current value is the default.",
"jsonEditor": "JSON Editor",
"jsonEditor": "JSON editor",
"missing": "Missing",
"moduleName": "Module Name",
"moduleName": "Module name",
"modulesWithMissingDependenciesWarning": "Some modules have unresolved backend dependencies",
"requiredVersion": "Required Version",
"resetToDefaultValueButtonText": "Reset to default",
"uiEditor": "UI Editor",
"uiEditor": "UI editor",
"unknownVersion": "unknown",
"updateConfig": "Update config",
"value": "Value",
"viewModules": "View modules"
}
2 changes: 2 additions & 0 deletions packages/apps/esm-implementer-tools-app/translations/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"backendModules": "وحدات الخلفية",
"checkImplementerToolsMessage": "تحقق من علامة التبويب وحدات الخلفية في أدوات المنفذ لمزيد من التفاصيل",
"clearConfig": "مسح التكوين المحلي",
"close": "Close",
"configuration": "تكوين",
"description": "وصف",
"downloadConfig": "تحميل التكوين",
Expand All @@ -23,6 +24,7 @@
"resetToDefaultValueButtonText": "إعادة تعيين إلى القيمة الافتراضية",
"uiEditor": "محرر الواجهة",
"unknownVersion": "غير معروف",
"updateConfig": "Update config",
"value": "قيمة",
"viewModules": "عرض الوحدات"
}
30 changes: 30 additions & 0 deletions packages/apps/esm-implementer-tools-app/translations/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"activeItemSourceText": "The current value comes from ",
"backendModules": "Backend modules",
"checkImplementerToolsMessage": "Check the Backend Modules tab in the Implementer Tools for more details",
"clearConfig": "Clear local config",
"close": "Close",
"configuration": "Configuration",
"description": "Description",
"downloadConfig": "Download config",
"edit": "Edit",
"editValueButtonText": "Edit",
"enabled": "Enabled",
"extensions": "Extensions",
"featureFlag": "Feature flag",
"featureFlags": "Feature flags",
"frontendModules": "Frontend modules",
"installedVersion": "Installed version",
"itemDescriptionSourceDefaultText": "The current value is the default.",
"jsonEditor": "JSON editor",
"missing": "Missing",
"moduleName": "Module name",
"modulesWithMissingDependenciesWarning": "Some modules have unresolved backend dependencies",
"requiredVersion": "Required Version",
"resetToDefaultValueButtonText": "Reset to default",
"uiEditor": "UI editor",
"unknownVersion": "unknown",
"updateConfig": "Update config",
"value": "Value",
"viewModules": "View modules"
}
26 changes: 14 additions & 12 deletions packages/apps/esm-implementer-tools-app/translations/es.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
{
"activeItemSourceText": "El valor coriente viene de ",
"backendModules": "Modulos backend",
"checkImplementerToolsMessage": "Consulta la pestaña Módulos de Backend en las Herramientas del Implementador para obtener más detalles",
"clearConfig": "Borrar config",
"activeItemSourceText": "El valor actual viene de ",
"backendModules": "Módulos Backend",
"checkImplementerToolsMessage": "Consulta la pestaña Módulos Backend en las Herramientas del Implementador para obtener más detalles",
"clearConfig": "Borrar configuración local",
"close": "Cerrar",
"configuration": "Configuración",
"description": "Descripción",
"downloadConfig": "Descargar config",
"downloadConfig": "Descargar configuración",
"edit": "Editar",
"editValueButtonText": "Editar",
"enabled": "Habilitado",
"extensions": "Extensiones",
"featureFlag": "Feature Flag",
"featureFlags": "Feature Flags",
"frontendModules": "Frontend Modules",
"featureFlag": "Feature flag",
"featureFlags": "Feature flags",
"frontendModules": "Módulos Frontend",
"installedVersion": "Versión instalada",
"itemDescriptionSourceDefaultText": "El valor coriente es lo predeterminado.",
"jsonEditor": "Editar como JSON",
"missing": "Falta",
"moduleName": "Nombre de modulo",
"modulesWithMissingDependenciesWarning": "Some modules have unresolved backend dependencies",
"moduleName": "Nombre del módulo",
"modulesWithMissingDependenciesWarning": "Algunos módulos tienen dependencias del backend sin resolver",
"requiredVersion": "Versión requerida",
"resetToDefaultValueButtonText": "Volver al valor predeterminado",
"uiEditor": "Editór visual",
"unknownVersion": "desconocida",
"uiEditor": "Editor visual",
"unknownVersion": "desconocido/a",
"updateConfig": "Actualizar configuración",
"value": "Valor",
"viewModules": "Ver módulos"
}
Loading