Skip to content

Commit

Permalink
fix: Resolve webpack build failure
Browse files Browse the repository at this point in the history
- Fix invalid CSS rules
- Fix config path for Prettier in GH Actions
- Temporarily ignore unparseable files for Prettier
  • Loading branch information
blarghmatey committed May 1, 2024
1 parent 579c8dd commit cee3ecb
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 25 deletions.
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.venv/
.yarn/
flow-typed/npm/
static/js/flow/
static/js/components/forms/elements/FormError.js
static/js/lib/queries/catalog.js
static/js/containers/pages/profile/ViewProfilePage.js
static/js/lib/courses.js
static/js/store/configureStore.js
static/js/util/integration_test_helper.js
static/js/lib/queries/digitalCredentials.js
static/js/Router.js
static/js/components/forms/ProfileFormFields.js
voucher/templates/enroll.html
mail/templates/product_order_receipt/body.html
40 changes: 25 additions & 15 deletions cms/templates/partials/hero.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load wagtailembeds_tags image_version_url %}

{% block extrahead %}
<style>
<style>
{% if page.background_image %}
.header-block {
background-image: url('{% image_version_url page.background_image "fill-768x576" %}');
Expand All @@ -18,16 +18,22 @@
{% endif %}
}
{% endif %}
</style>
</style>
{% endblock %}

<div class="header-block">
<div class="container header-container">
{% if background_video_url %}
{% if not request.user_agent.is_mobile %}
<video autoplay muted loop class="background-video" id="background-video" data-source="{{ background_video_url }}">
</video>
{% endif %}
{% if not request.user_agent.is_mobile %}
<video
autoplay
muted
loop
class="background-video"
id="background-video"
data-source="{{ background_video_url }}"
></video>
{% endif %}
{% endif %}
<div class="row">
<div class="col-lg-7">
Expand All @@ -46,15 +52,19 @@ <h2>{{ page.subhead }}</h2>
</div>
<div class="col-lg-5">
{% if page.video_url %}
{% embed page.video_url as youtube_video %}
{% if youtube_video %}
<div class="promo-video youtube-video">{{ youtube_video }}</div>
{% else %}
<video class="promo-video" id="promo-video" data-source="{{ page.video_url }}" controls></video>
{% endif %}
<div class="video-caption">{{ page.video_title|safe }}</div>
{% endif %}
</div>
{% embed page.video_url as youtube_video %}
{% if youtube_video %}
<div class="promo-video youtube-video">{{ youtube_video }}</div>
{% else %}
<video
class="promo-video"
id="promo-video"
data-source="{{ page.video_url }}"
controls
></video>
{% endif %}
<div class="video-caption">{{ page.video_title|safe }}</div>
{% endif %}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion hubspot_xpro/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from hubspot.crm.objects import SimplePublicObject, SimplePublicObjectInput
from mitol.hubspot_api.api import (
HubspotApi,
HubspotAssociationType,
Expand All @@ -27,6 +26,7 @@
from b2b_ecommerce.constants import B2B_ORDER_PREFIX
from b2b_ecommerce.models import B2BLine, B2BOrder
from ecommerce.models import Line, Order, Product, ProductVersion
from hubspot.crm.objects import SimplePublicObject, SimplePublicObjectInput
from users.models import User

log = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion hubspot_xpro/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

import pytest
from django.contrib.contenttypes.models import ContentType
from hubspot.crm.objects import SimplePublicObject
from mitol.hubspot_api.factories import HubspotObjectFactory

from b2b_ecommerce import factories as b2b_factories
from ecommerce import factories
from ecommerce.models import Order, Product
from hubspot.crm.objects import SimplePublicObject
from users.models import User

TIMESTAMPS = [
Expand Down
4 changes: 2 additions & 2 deletions hubspot_xpro/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import celery
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation
from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput
from mitol.common.decorators import single_task
from mitol.common.utils import chunks
from mitol.hubspot_api.api import HubspotApi, HubspotAssociationType, HubspotObjectType
Expand All @@ -20,6 +18,8 @@

from b2b_ecommerce.models import B2BOrder
from ecommerce.models import Order
from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation
from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput
from hubspot_xpro import api
from hubspot_xpro.api import get_hubspot_id_for_object
from mitxpro.celery import app
Expand Down
4 changes: 2 additions & 2 deletions hubspot_xpro/tasks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import pytest
from django.contrib.contenttypes.models import ContentType
from faker import Faker
from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation
from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput
from mitol.hubspot_api.api import HubspotAssociationType, HubspotObjectType
from mitol.hubspot_api.exceptions import TooManyRequestsException
from mitol.hubspot_api.factories import HubspotObjectFactory, SimplePublicObjectFactory
Expand All @@ -24,6 +22,8 @@
ProductVersionFactory,
)
from ecommerce.models import Order, Product
from hubspot.crm.associations import BatchInputPublicAssociation, PublicAssociation
from hubspot.crm.objects import ApiException, BatchInputSimplePublicObjectInput
from hubspot_xpro import tasks
from hubspot_xpro.api import make_contact_sync_message
from hubspot_xpro.tasks import task_obj_lock
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
"watch": "WATCH=1 ./scripts/test/js_test.sh",
"repl": "node --require ./scripts/repl.js",
"flow": "flow check",
"fmt": "LOG_LEVEL= prettier --write --no-semi --ignore 'static/js/flow/**/*.js' --ignore $PWD/'static/js/**/*.js'",
"fmt:check": "LOG_LEVEL= prettier --check --no-semi --ignore 'static/js/flow/**/*.js' --ignore $PWD/'static/js/**/*.js'"
"fmt": "LOG_LEVEL= prettier --config .prettierrc.json --write .",
"fmt:check": "LOG_LEVEL= prettier --config .prettierrc.json --check ."
},
"resolutions": {
"mixin-deep": "^1.3.2",
Expand Down
2 changes: 1 addition & 1 deletion static/scss/detail/for-teams.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
line-height: 28px;
padding: 20px 0;
font-weight: 500;
border-top: 1px solid rgb(white 0.2);
border-top: 1px solid rgba(white, 0.2); /* stylelint-disable-line */

&:first-child {
border: none;
Expand Down
2 changes: 1 addition & 1 deletion static/scss/detail/who-should-enroll.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
line-height: 28px;
padding: 20px 0;
font-weight: 500;
border-top: 1px solid rgb(white 0.2);
border-top: 1px solid rgba(white, 0.2); /* stylelint-disable-line */
text-align: left;

&:first-child {
Expand Down

0 comments on commit cee3ecb

Please sign in to comment.