Skip to content

Commit

Permalink
Merge branch 'master' into fix/insights-css
Browse files Browse the repository at this point in the history
# Conflicts:
#	frontend/__snapshots__/scenes-app-insights--retention--webkit.png
#	frontend/src/exporter/ExportedInsight/ExportedInsight.scss
#	frontend/src/exporter/Exporter.scss
#	frontend/src/lib/components/Cards/CardMeta.scss
#	frontend/src/lib/components/Cards/InsightCard/InsightCard.scss
#	frontend/src/queries/nodes/InsightViz/EditorFilters.scss
#	frontend/src/scenes/funnels/FunnelBarChart/FunnelBarChart.scss
#	frontend/src/scenes/insights/Insight.scss
#	frontend/src/scenes/insights/views/InsightsTable/InsightsTable.scss
  • Loading branch information
benjackwhite committed Nov 15, 2023
2 parents aa7d2e3 + 74c0309 commit 1bb392a
Show file tree
Hide file tree
Showing 197 changed files with 2,817 additions and 567 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ jobs:
run: pnpm prettier:check

- name: Lint with ESLint
run: pnpm eslint
run: pnpm lint:js

- name: Lint with Stylelint
run: pnpm lint:css

- name: Generate logic types and run typescript with strict
run: pnpm typegen:write && pnpm typescript:check
Expand Down
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frontend/dist/
48 changes: 48 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
extends: 'stylelint-config-standard-scss', // TODO: Enable separately, as the diff will be significant
// TODO: Enable separately, as the diff will be significant "plugins": ["stylelint-order"],
rules: {
'no-descending-specificity': null,
'number-max-precision': 5,
'value-keyword-case': [
'lower',
{
// CSS Color Module Level 3 says currentColor, Level 4 candidate says currentcolor
// Sticking to Level 3 for now
camelCaseSvgKeywords: true,
},
],
// Sadly Safari only started supporting the range syntax of media queries in 2023, so let's switch to that
// ('context' value) in 2024, once support is better https://caniuse.com/?search=range%20context
'media-feature-range-notation': 'prefix',
'selector-class-pattern': [
'^[A-Za-z0-9_-]+(__[A-Za-z0-9_-]+)?(--[A-Za-z0-9-]+)?$',
{
message: 'Expected class selector to match Block__Element--Modifier or plain snake-case',
},
],
'selector-id-pattern': [
'^[A-Za-z0-9_-]+(__[A-Za-z0-9_-]+)?(--[A-Za-z0-9_-]+)?$',
{
message: 'Expected id selector to match Block__Element--Modifier or plain kebak-case',
},
],
'keyframes-name-pattern': [
'^[A-Za-z0-9_-]+__[A-Za-z0-9_-]+$',
{
message: 'Expected keyframe name to match Block__Animation',
},
],
'scss/dollar-variable-pattern': [
'^[A-Za-z_]+[A-Za-z0-9_-]+$',
{
message: 'Expected variable to match kebab-case or snake_case',
},
],
'scss/operator-no-newline-after': null, // Doesn't always play well with prettier
'scss/at-extend-no-missing-placeholder': null,
'scss/comment-no-empty': null,
// "order/order": ["dollar-variables", "custom-properties", "declarations", "rules", "at-rules"],
// "order/properties-order": ["width", "height"],
},
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/src/exporter/ExportedInsight/ExportedInsight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
right: 0;
top: 0;
z-index: 2;

svg {
font-size: 0.75rem;
margin: 0.25rem;
Expand Down
46 changes: 23 additions & 23 deletions frontend/src/exporter/Exporter.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,5 @@
@import '../styles/mixins';

html.export-type-image {
// We don't want scrollbars to show in image captures
::-webkit-scrollbar {
display: none;
}

body {
// We put Inter first so that rendered images are the same no matter which platform it is rendered on.
font-family: 'Inter', 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
}
}

html.export-type-embed {
overflow: hidden;
overflow-y: auto;

.Exporter {
padding: 0;
min-height: 100vh;
}
}

.Exporter {
padding: 1rem;
min-height: 100vh;
Expand Down Expand Up @@ -56,3 +33,26 @@ html.export-type-embed {
}
}
}

html.export-type-image {
// We don't want scrollbars to show in image captures
::-webkit-scrollbar {
display: none;
}

body {
// We put Inter first so that rendered images are the same no matter which platform it is rendered on.
font-family: 'Inter', 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
}
}

html.export-type-embed {
overflow: hidden;
overflow-y: auto;

.Exporter {
padding: 0;
min-height: 100vh;
}
}
4 changes: 4 additions & 0 deletions frontend/src/layout/ErrorBoundary/ErrorBoundary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@
padding: 0.75rem 1rem 1rem;
min-width: 0;
height: fit-content;

.main-app-content > & {
margin: 1.5rem 0;
}

h2 {
margin-bottom: 0.75rem;
color: var(--danger);
font-weight: 600;
}

pre {
margin-bottom: 0.75rem;
background: var(--border-light);
border-radius: var(--radius);
padding: 0.75rem 1rem;
}

.help-button {
margin-top: 0.75rem;
}
Expand Down
Loading

0 comments on commit 1bb392a

Please sign in to comment.