From f93f8212af4c56160eeb07495ab40e27888a8e0a Mon Sep 17 00:00:00 2001 From: Ans Date: Fri, 26 Apr 2024 16:57:09 -0400 Subject: [PATCH] Fix incorrect BEM pfc --- .../college-cost-blocks/14-summary.html | 4 +- .../jinja2/paying-for-college/disclosure.html | 4 +- .../css/college-costs/financial-item.less | 2 +- .../js/disclosures/views/financial-view.js | 6 +-- .../js/disclosures/views/metric-view.js | 14 +++---- .../js/disclosures/views/question-view.js | 20 ++++----- .../disclosures/fixtures/overview.js | 41 ++++++++++--------- 7 files changed, 46 insertions(+), 45 deletions(-) diff --git a/cfgov/paying_for_college/jinja2/paying-for-college/college-cost-blocks/14-summary.html b/cfgov/paying_for_college/jinja2/paying-for-college/college-cost-blocks/14-summary.html index e9f07a57a3e..aca1a7b9ecb 100644 --- a/cfgov/paying_for_college/jinja2/paying-for-college/college-cost-blocks/14-summary.html +++ b/cfgov/paying_for_college/jinja2/paying-for-college/college-cost-blocks/14-summary.html @@ -48,7 +48,7 @@

Covering your costs

) }} - +
@@ -100,7 +100,7 @@

Covering your costs

- +
diff --git a/cfgov/paying_for_college/jinja2/paying-for-college/disclosure.html b/cfgov/paying_for_college/jinja2/paying-for-college/disclosure.html index 6a466ee3229..7f42a04a407 100644 --- a/cfgov/paying_for_college/jinja2/paying-for-college/disclosure.html +++ b/cfgov/paying_for_college/jinja2/paying-for-college/disclosure.html @@ -2061,7 +2061,7 @@

data-incoming-format="decimal-percent" data-graph-min="0" data-graph-max="1"> -
+
40%
-
+
1) { yearsAttending += ' years'; - $multiYears.filter('.line-item_title').show('inline-block'); + $multiYears.filter('.line-item__title').show('inline-block'); $multiYears.filter('.line-item').show(); $yearOrLess.hide(); } else { yearsAttending += ' year'; $multiYears.hide(); - $yearOrLess.filter('.line-item_title').show('inline-block'); + $yearOrLess.filter('.line-item__title').show('inline-block'); $yearOrLess.filter('.line-item').show(); } @@ -909,7 +909,7 @@ const financialView = { * if the summaries are in the inline-block sidebar column */ // stickySummariesListener: function () { - // const $stickyOffers = $('.offer-part_summary-wrapper'); + // const $stickyOffers = $('.offer-part__summary-wrapper'); // const $win = $(window); // if ($win.width() >= 600 && $stickyOffers.data('sticky_kit') !== true) { diff --git a/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/metric-view.js b/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/metric-view.js index db5b3b72b9f..92a69eb0986 100755 --- a/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/metric-view.js +++ b/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/metric-view.js @@ -137,7 +137,7 @@ const metricView = { // If the values are equal, handle the display with CSS only if (metrics.school === metrics.national) { - $graph.addClass('bar-graph__equal'); + $graph.addClass('bar-graph--equal'); return; } // If the points partially overlap, move the higher point's labels up @@ -171,12 +171,12 @@ const metricView = { const metricKey = $graph.attr('data-metric'); const metrics = metricView.metrics[metricKey]; if (isNaN(metrics.school)) { - $graph.addClass('bar-graph__missing-you'); + $graph.addClass('bar-graph--missing-you'); } else { this.updateText($school, metrics.school, metrics.format); } if (isNaN(metrics.national)) { - $graph.addClass('bar-graph__missing-average'); + $graph.addClass('bar-graph--missing-average'); } else { this.updateText($national, metrics.national, metrics.format); } @@ -210,7 +210,7 @@ const metricView = { prevent those values from falling off the top of the graph */ if (schoolValue > max) { bottoms.school = graphHeight; - $graph.addClass('bar-graph__high-point'); + $graph.addClass('bar-graph--high-point'); } $school.each((elem) => { elem.style.bottom = bottoms.school + 'px'; @@ -228,10 +228,10 @@ const metricView = { getNotifications: function (metricKey) { let classes = 'cf-notification '; const standingClasses = { - same: 'metric_notification--same', - better: 'metric_notification--better', + same: 'metric__notification--same', + better: 'metric__notification--better', worse: - 'cf-notification metric_notification--worse ' + + 'cf-notification metric__notification--worse ' + 'cf-notification--error', }; const metrics = metricView.metrics[metricKey]; diff --git a/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/question-view.js b/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/question-view.js index d15fcb97753..ff13cf2608d 100755 --- a/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/question-view.js +++ b/cfgov/unprocessed/apps/paying-for-college/js/disclosures/views/question-view.js @@ -8,15 +8,15 @@ const questionView = { $settlementBigQuestion: $('.step__settlement'), $nonsettlementBigQuestion: $('.step__nonsettlement'), $getOptions: $('.get-options'), - $followupNoNotSure: $('.followup__no-not-sure'), - $followupYes: $('.followup__yes'), - $optionsWrapper: $('.get-options__dynamic'), + $followupNoNotSure: $('.followup--no-not-sure'), + $followupYes: $('.followup--yes'), + $optionsWrapper: $('.get-options--dynamic'), $options: $('.option'), $optionsSidebar: $('.get-options__sidebar'), - $transferCredits: $('.option__transfer-credits'), - $exploreSchools: $('.option__explore-schools'), - $workWhileStudying: $('.option__work-while-studying'), - $takeAction: $('.option__take-action'), + $transferCredits: $('.option--transfer-credits'), + $exploreSchools: $('.option--explore-schools'), + $workWhileStudying: $('.option--work-while-studying'), + $takeAction: $('.option--take-action'), $nextSteps: $('.next-steps'), /** @@ -39,14 +39,14 @@ const questionView = { questionView.$nonsettlementBigQuestion.hide(); $('#question__answer-no').hide(); questionView.$optionsWrapper.addClass( - 'get-options__settlement content__main', + 'get-options--settlement content__main', ); questionView.$transferCredits.remove(); questionView.$exploreSchools.remove(); questionView.$takeAction.remove(); - questionView.$options.addClass('option__settlement'); + questionView.$options.addClass('option--settlement'); questionView.$optionsSidebar.show(); - questionView.$optionsWrapper.removeClass('get-options__dynamic'); + questionView.$optionsWrapper.removeClass('get-options--dynamic'); } else { questionView.$settlementBigQuestion.hide(); questionView.$nonsettlementBigQuestion.show(); diff --git a/test/unit_tests/apps/paying-for-college/disclosures/fixtures/overview.js b/test/unit_tests/apps/paying-for-college/disclosures/fixtures/overview.js index f557af4c52c..7cabcc97330 100644 --- a/test/unit_tests/apps/paying-for-college/disclosures/fixtures/overview.js +++ b/test/unit_tests/apps/paying-for-college/disclosures/fixtures/overview.js @@ -367,7 +367,7 @@ export default `

Based on financial need, - see how you qualify + see how you qualify

@@ -458,7 +458,7 @@ export default `

Money for service members or veterans that you don’t have - to pay back; see how much the + to pay back; see how much the GI Bill pays

@@ -803,7 +803,7 @@ export default ` Reserved for students most in need; interest starts accumulating 9 months after you - leave school; + leave school; see how you qualify

@@ -1025,7 +1025,8 @@ export default ` @@ -1495,10 +1496,10 @@ export default ` program at this school

-
+
-
This school
+
This school
26%
@@ -1506,7 +1507,7 @@ export default `

- Consider applying for additional + Consider applying for additional scholarships and grants , which provide money you don’t have to repay. By increasing the amount of this type of @@ -2326,7 +2327,7 @@ export default `

Living at home or finding cheaper off-campus housing can - reduce the + reduce the cost of attendance , meaning you can borrow less money overall.

@@ -2363,7 +2364,7 @@ export default ` can help reduce the amount of money you need to borrow to pay for school, resulting in long-term benefits of reducing overall debt. - Check out resources for finding a + Check out resources for finding a job , including links to job search sites, tips for writing a résumé, and more. @@ -2401,7 +2402,7 @@ export default ` college students
- College + College Scorecard

Compare your school ’s annual costs, @@ -2409,11 +2410,11 @@ export default ` earnings.

- Questions to ask + Questions to ask your college

- FAFSA® + FAFSA®

Apply for federal, state, and school financial aid.