Skip to content

Commit

Permalink
Merge pull request #423 from onaio/380-irs-map-tooltip-hint
Browse files Browse the repository at this point in the history
Add hint string to Jurisdiction Selection tooltip
  • Loading branch information
Conor Kelly authored Aug 28, 2019
2 parents 615006f + b5c456d commit c3f8327
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/configs/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ export const lineLayerConfig = {
visible: false,
};

export const jurisdictionSelectionTooltipHint: string =
'Shift+Click a Jurisdiction to toggle its selection';

/** Fill opacity configuration */
export const structureFillOpacity: Expression = [
'match',
Expand Down
3 changes: 2 additions & 1 deletion src/containers/pages/InterventionPlan/IRS/plan/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {
fillLayerConfig,
JurisdictionLevels,
JurisdictionsByCountry,
jurisdictionSelectionTooltipHint,
JurisdictionTypes,
lineLayerConfig,
} from './../../../../../configs/settings';
Expand Down Expand Up @@ -1498,7 +1499,7 @@ class IrsPlan extends React.Component<
const tooltipVal = tilesets[t].labelField || tilesets[t].idField;
if (tooltipVal && tooltipVal.length) {
(adminFillLayer as any).popup = {
body: `<p class="select-jurisdictin-tooltip">{{${tooltipVal}}}</p>`,
body: `<div><p class="select-jurisdictin-tooltip">{{${tooltipVal}}}</p><span class="select-jurisdictin-tooltip-hint">${jurisdictionSelectionTooltipHint}</span></div>`,
};
}

Expand Down
10 changes: 9 additions & 1 deletion src/containers/pages/InterventionPlan/IRS/plan/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,13 @@
}

.select-jurisdictin-tooltip {
padding: 6px 8px !important;
padding: 6px 8px 0 !important;
font-weight: 600 !important;
}

.select-jurisdictin-tooltip-hint {
color: grey;
font-size: 0.75rem;
font-style: italic;
padding: 0 6px 8px !important;
}

0 comments on commit c3f8327

Please sign in to comment.