PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
41 stars 108 forks source link

Tooltip with variable description in `Vary your earnings` chart #285

Open MaxGhenis opened 1 year ago

MaxGhenis commented 1 year ago

Tooltip with the description of the selected variable.

image
abhcs commented 11 months ago

I have two questions:

  1. Which element should the tooltip be displayed over?
  2. Do variables have descriptions? For most variables, I can't see a variable description in the metadata. For instance, this is what I see for the variable household_net_income in the metadata:
adds: ["household_market_income", "household_benefits", "household_refundable_tax_credits"] (3)

category: null

defaultValue: 0

definitionPeriod: "year"

documentation: null

entity: "household"

hidden_input: false

indexInModule: 0

isInputVariable: false

label: "net income"

moduleName: "household.income.household.household_net_income"

name: "household_net_income"

subtracts: ["household_tax_before_refundable_credits"] (1)

unit: "currency-USD"

valueType: "float"
MaxGhenis commented 11 months ago

My mistake - the field should be documentation. It's not available for all but we can start enforcing that more @PavelMakarchuk

Example: https://github.com/PolicyEngine/policyengine-us/blob/3c3d7556e955dfb3d368fea0219b480cc95ea78d/policyengine_us/variables/gov/hud/is_eligible_for_housing_assistance.py#L8

anth-volk commented 11 months ago

Would it be better to instead add some sort of question mark in a circle icon and have the documentation visible on hover over that?

PavelMakarchuk commented 11 months ago

My mistake - the field should be documentation. It's not available for all but we can start enforcing that more @PavelMakarchuk

Example: https://github.com/PolicyEngine/policyengine-us/blob/3c3d7556e955dfb3d368fea0219b480cc95ea78d/policyengine_us/variables/gov/hud/is_eligible_for_housing_assistance.py#L8

Sure, generally speaking how do we differentiate the documentation from the current label / description usage?