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

Feat: 1692 tooltips #1774

Merged
merged 29 commits into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
292b4a3
chore: change default tooltip icon to faInfoCircle
sam-warren Jun 9, 2023
ea0646c
chore: fix uneven spacing when tooltip contained <ul>
sam-warren Jun 9, 2023
7a5ade8
chore: add tooltips for Budgets, Expenses & Payments
sam-warren Jun 9, 2023
ad83989
chore: create tooltips for Milestone Reports
sam-warren Jun 9, 2023
f371efa
chore: create tooltip test for calculated value widget
sam-warren Jun 9, 2023
dfcc5f8
chore: update tests to match new default icon
sam-warren Jun 13, 2023
ed85c12
chore: typo fix
sam-warren Jun 13, 2023
4f53912
chore: implement basic tests
sam-warren Jun 15, 2023
3752441
chore: add EI report form tests
sam-warren Jun 22, 2023
9c6effb
chore: clean up EI test, add EI summary tests
sam-warren Jun 22, 2023
3a0c2d9
chore: create milestone report form tests, update EI tests
sam-warren Jun 22, 2023
9f6cc26
chore: revert changes to EI forms
sam-warren Jun 22, 2023
9ec73ee
chore: create milestone summary tests for tooltips
sam-warren Jun 27, 2023
20823ab
chore: create milestone summary tests for tooltips
sam-warren Jun 29, 2023
23cd8bc
chore: remove unnecessary function
sam-warren Jun 29, 2023
8319d31
feat: move EI tooltips to UI schema
sam-warren Jun 30, 2023
c2d97d3
chore: tooltip typo fix
sam-warren Jun 30, 2023
8bfe4bf
chore: update spacing, font size, for tooltips
sam-warren Jun 30, 2023
69f16aa
chore: update tooltip texts to give all bullet points for consistency
sam-warren Jun 30, 2023
89a3c41
feat: update milestone form tests for consistency
sam-warren Jun 30, 2023
4b94ab2
chore: test for tooltip text in adjustable calculated value widget
sam-warren Jun 30, 2023
c1be6bb
test: jest tests for forms with tooltips
BCerki Jul 5, 2023
41d8e77
refactor: dry up tooltip text
BCerki Jul 5, 2023
f51b860
test: jest tests for forms with tooltips
BCerki Jul 5, 2023
f7eeb18
chore: fix failing test due to rebase
sam-warren Jul 13, 2023
1b06887
chore: update tests after rebase
sam-warren Jul 13, 2023
3177ac6
chore: update snapshot
sam-warren Jul 13, 2023
20ce757
chore: update snapshot
sam-warren Jul 13, 2023
c33261d
chore: add tooltips back to ui schema, update snapshot
sam-warren Jul 17, 2023
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
16 changes: 14 additions & 2 deletions app/data/jsonSchemaForm/emissionIntensityUiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { emissionsIntentityTooltips } from "./tooltipText";

export const emissionIntensityReportingRequirementUiSchema = {
"ui:order": [
"reportDueDate",
Expand Down Expand Up @@ -54,8 +56,10 @@ export const emissionIntensityReportingRequirementUiSchema = {
isPercentage: true,
numberOfDecimalPlaces: 2,
hideOptional: true,
"ui:tooltip": {
text: emissionsIntentityTooltips.adjustedEmissionsIntensityPerformance,
},
},

calculatedEiPerformance: {
isPercentage: true,
numberOfDecimalPlaces: 2,
Expand All @@ -68,20 +72,28 @@ export const emissionIntensityReportingRequirementUiSchema = {
hideOptional: true,
calculatedValueFormContextProperty:
"paymentPercentageOfPerformanceMilestoneAmount",
"ui:tooltip": {
text: emissionsIntentityTooltips.paymentPercentage,
},
},

actualPerformanceMilestoneAmount: {
"ui:widget": "CalculatedValueWidget",
calculatedValueFormContextProperty: "actualPerformanceMilestoneAmount",
isMoney: true,
hideOptional: true,
"ui:tooltip": {
text: emissionsIntentityTooltips.actualPerformanceMilestoneAmount,
},
},
holdbackAmountToDate: {
"ui:widget": "CalculatedValueWidget",
calculatedValueFormContextProperty: "holdbackAmountToDate",
isMoney: true,
hideOptional: true,
renamedId: "maximumPerformanceMilestoneAmount",
"ui:tooltip": {
text: emissionsIntentityTooltips.holdbackAmountToDate,
},
},
dateSentToCsnr: {
"ui:widget": "DateWidget",
Expand Down
34 changes: 34 additions & 0 deletions app/data/jsonSchemaForm/fundingParameterEPUiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AdditionalFundingSourcesArrayFieldTemplate from "components/Form/AdditionalFundingSourcesArrayFieldTemplate";
import AnticipatedFundingAmountPerFiscalYearArrayFieldTemplate from "components/Form/AnticipatedFundingAmountByFiscalYearArrayFieldTemplate";
import { fundingTooltips } from "./tooltipText";

export const fundingParameterEPUiSchema = {
"ui:order": [
Expand All @@ -21,26 +22,41 @@ export const fundingParameterEPUiSchema = {
],
totalProjectValue: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.totalProjectValue,
},
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedTotalProjectValue",
},
maxFundingAmount: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.maxFundingAmount,
},
isMoney: true,
},
provinceSharePercentage: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.provinceSharePercentage,
},
isPercentage: true,
numberOfDecimalPlaces: 2,
},
holdbackPercentage: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.holdbackPercentage,
},
isPercentage: true,
numberOfDecimalPlaces: 2,
},
proponentsSharePercentage: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.proponentsSharePercentage,
},
numberOfDecimalPlaces: 2,
isPercentage: true,
calculatedValueFormContextProperty: "calculatedProponentsSharePercentage",
Expand Down Expand Up @@ -68,6 +84,9 @@ export const fundingParameterEPUiSchema = {
},
proponentCost: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.proponentCost,
},
isMoney: true,
},
contractStartDate: {
Expand All @@ -78,24 +97,36 @@ export const fundingParameterEPUiSchema = {
},
eligibleExpensesToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.eligibleExpensesToDate,
},
calculatedValueFormContextProperty: "calculatedEligibleExpensesToDate",
hideOptional: true,
isMoney: true,
},
grossPaymentsToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.grossPaymentsToDate,
},
calculatedValueFormContextProperty: "calculatedGrossPaymentsToDate",
hideOptional: true,
isMoney: true,
},
holdbackAmountToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.holdbackAmountToDate,
},
calculatedValueFormContextProperty: "calculatedHoldbackAmountToDate",
hideOptional: true,
isMoney: true,
},
netPaymentsToDate: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.netPaymentsToDate,
},
calculatedValueFormContextProperty: "calculatedNetPaymentsToDate",
hideOptional: true,
isMoney: true,
Expand All @@ -111,6 +142,9 @@ export const fundingParameterEPUiSchema = {
amount: {
"ui:title": `Additional Funding Amount`,
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.additionalFundingSourcesAmount,
},
isMoney: true,
},
status: {
Expand Down
19 changes: 19 additions & 0 deletions app/data/jsonSchemaForm/fundingParameterIAUiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AdditionalFundingSourcesArrayFieldTemplate from "components/Form/AdditionalFundingSourcesArrayFieldTemplate";
import AnticipatedFundingAmountPerFiscalYearArrayFieldTemplate from "components/Form/AnticipatedFundingAmountByFiscalYearArrayFieldTemplate";
import { fundingTooltips } from "./tooltipText";

export const fundingParameterIAUiSchema = {
"ui:order": [
Expand All @@ -17,21 +18,33 @@ export const fundingParameterIAUiSchema = {
],
totalProjectValue: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.totalProjectValue,
},
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedTotalProjectValue",
},
maxFundingAmount: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.maxFundingAmount,
},
isMoney: true,
},
provinceSharePercentage: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.provinceSharePercentage,
},
isPercentage: true,
numberOfDecimalPlaces: 2,
},
proponentsSharePercentage: {
"ui:widget": "CalculatedValueWidget",
"ui:tooltip": {
text: fundingTooltips.proponentsSharePercentage,
},
numberOfDecimalPlaces: 2,
isPercentage: true,
calculatedValueFormContextProperty: "calculatedProponentsSharePercentage",
Expand Down Expand Up @@ -59,6 +72,9 @@ export const fundingParameterIAUiSchema = {
},
proponentCost: {
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.proponentCost,
},
isMoney: true,
},
contractStartDate: {
Expand All @@ -85,6 +101,9 @@ export const fundingParameterIAUiSchema = {
amount: {
"ui:title": `Additional Funding Amount`,
"ui:widget": "NumberWidget",
"ui:tooltip": {
text: fundingTooltips.additionalFundingSourcesAmount,
},
isMoney: true,
},
status: {
Expand Down
Loading