Skip to content

Commit

Permalink
Coderabbit theme and fixes (#175)
Browse files Browse the repository at this point in the history
* coderabbit theme

* theme change

* checkpoint

* fixes

* added coderabbit authentication
  • Loading branch information
GurinderRawala committed Aug 27, 2024
1 parent 2ce8ced commit 0306b49
Show file tree
Hide file tree
Showing 24 changed files with 228 additions and 434 deletions.
6 changes: 1 addition & 5 deletions .betterer.results
Original file line number Diff line number Diff line change
Expand Up @@ -1296,11 +1296,7 @@ exports[`better eslint`] = {
],
"public/app/core/services/backend_srv.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/core/services/context_srv.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
Expand Down
27 changes: 27 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
27 changes: 27 additions & 0 deletions .yarn/sdks/prettier/bin/prettier.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
if (isPnpLoaderEnabled && register) {
register(pathToFileURL(absPnpLoaderPath));
}
}
}

// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);
2 changes: 1 addition & 1 deletion packages/grafana-data/src/themes/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function createBreakpoints(): ThemeBreakpoints {
const values: ThemeBreakpointValues = {
xs: 0,
sm: 544,
md: 769, // 1 more than regular ipad in portrait
md: 768, // 1 more than regular ipad in portrait
lg: 992,
xl: 1200,
xxl: 1440,
Expand Down
20 changes: 10 additions & 10 deletions packages/grafana-data/src/themes/createColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ class LightColors implements ThemeColorsBase<Partial<ThemeRichColor>> {
blackBase = '45, 51, 62';

primary = {
main: '#8EC4AD',
border: palette.blueLightText,
text: '#F0E4B6',
main: '#FF4702',
border: '#E33E00',
text: '#101828',
};

text = {
primary: '#2D333E',
secondary: '#2d333e',
primary: '#101828',
secondary: '#344054',
disabled: '#9DA7B8',
link: this.primary.text,
link: '#FF4702',
maxContrast: palette.black,
};

Expand All @@ -191,7 +191,7 @@ class LightColors implements ThemeColorsBase<Partial<ThemeRichColor>> {
};

secondary = {
main: '#FC9A69',
main: '#FF4702',
shade: '#FC9A6990',
contrastText: `rgba(${this.blackBase}, 1)`,
text: this.text.primary,
Expand Down Expand Up @@ -220,9 +220,9 @@ class LightColors implements ThemeColorsBase<Partial<ThemeRichColor>> {
};

background = {
canvas: '#F6F5F3',
primary: '#FDFDFC',
secondary: '#FDFDFC',
primary: '#FAFAFA',
canvas: '#FFFFFF',
secondary: '#FAFAFA',
};

action = {
Expand Down
12 changes: 6 additions & 6 deletions packages/grafana-data/src/themes/createTypography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ export interface ThemeTypographyInput {
htmlFontSize?: number;
}

const defaultFontFamily = '"Source Sans Pro", Nunito, Roboto, Arial'; //'"Roboto", "Helvetica", "Arial", sans-serif';
const defaultFontFamilyMonospace = "'Nunito Mono', 'Roboto Mono', monospace"; // "'Roboto Mono', monospace";
const defaultFontFamily = '"Poppins", Inter, Satoshi, sans-serif'; //'"Roboto", "Helvetica", "Arial", sans-serif';
const defaultFontFamilyMonospace = '"SatoshiLight", "FigtreeLight", monospace'; // "'Roboto Mono', monospace";

export function createTypography(colors: ThemeColors, typographyInput: ThemeTypographyInput = {}): ThemeTypography {
const {
fontFamily = defaultFontFamily,
fontFamilyMonospace = defaultFontFamilyMonospace,
// The default font size of the Material Specification.
fontSize = 14, // px
fontWeightLight = 300,
fontWeightRegular = 400,
fontWeightMedium = 500,
fontWeightLight = 200,
fontWeightRegular = 300,
fontWeightMedium = 400,
fontWeightBold = 500,
// Tell Grafana-UI what's the font-size on the html element.
// 16px is the default font-size used by browsers.
htmlFontSize = 14,
htmlFontSize = 16,
} = typographyInput;

if (process.env.NODE_ENV !== 'production') {
Expand Down
240 changes: 0 additions & 240 deletions packages/grafana-data/src/themes/fnCreateColors.ts

This file was deleted.

Loading

0 comments on commit 0306b49

Please sign in to comment.