Skip to content

Commit

Permalink
remove bold/italic, only links
Browse files Browse the repository at this point in the history
  • Loading branch information
queden committed Feb 6, 2022
1 parent 3f698bd commit 3173bf4
Show file tree
Hide file tree
Showing 10 changed files with 1,294 additions and 160 deletions.
1 change: 1 addition & 0 deletions browser/__mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
1 change: 1 addition & 0 deletions browser/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { presets: ['@babel/preset-env'] }
204 changes: 204 additions & 0 deletions browser/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/en/configuration.html
*/

module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,

// Stop running tests after `n` failures
// bail: 0,

// The directory where Jest should store its cached dependency information
// cacheDirectory: "C:\\Users\\caden\\AppData\\Local\\Temp\\jest",

// Automatically clear mock calls and instances between every test
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,

// The directory where Jest should output its coverage files
// coverageDirectory: undefined,

// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "\\\\node_modules\\\\"
// ],

// Indicates which provider should be used to instrument code for coverage
// coverageProvider: "babel",

// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],

// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,

// A path to a custom dependency extractor
// dependencyExtractor: undefined,

// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,

// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],

// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: undefined,

// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: undefined,

// A set of global variables that need to be available in all test environments
globals: {
"ts-jest": {
diagnostics: false,
isolatedModules: true,
}
},

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",

// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: [
"node_modules",
"<rootDir>",
"src",
],

// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "json",
// "jsx",
// "ts",
// "tsx",
// "node"
// ],

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|glsl)$': '<rootDir>/__mocks__/styleMock.js',
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],

// Activates notifications for test results
// notify: false,

// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",

// A preset that is used as a base for Jest's configuration
preset: "ts-jest",

// Run tests from one or more projects
// projects: undefined,

// Use this configuration option to add custom reporters to Jest
// reporters: undefined,

// Automatically reset mock state between every test
// resetMocks: false,

// Reset the module registry before running each individual test
// resetModules: false,

// A path to a custom resolver
// resolver: undefined,

// Automatically restore mock state between every test
// restoreMocks: false,

// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,

// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],

// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",

// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],

// The number of seconds after which a test is considered as slow and reported as such in the results.
// slowTestThreshold: 5,

// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],

// The test environment that will be used for testing
testEnvironment: "jsdom",

// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},

// Adds a location field to test results
// testLocationInResults: false,

// The glob patterns Jest uses to detect test files
// testMatch: [
// "**/__tests__/**/*.[jt]s?(x)",
// "**/?(*.)+(spec|test).[tj]s?(x)"
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "\\\\node_modules\\\\"
// ],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],

// This option allows the use of a custom results processor
// testResultsProcessor: undefined,

// This option allows use of a custom test runner
// testRunner: "jasmine2",

// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",

// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",

// A map from regular expressions to paths to transformers
transform: {
"node_modules/variables/.+\\.(j|t)sx?$": "ts-jest",
'^.+\\.(ts|tsx)?$': 'ts-jest',
"^.+\\.(js|jsx)$": "babel-jest",
},
transformIgnorePatterns: [
"node_modules/(?!variables/.*)"
]

// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,

// Indicates whether each individual test should be reported during the run
// verbose: undefined,

// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],

// Whether to use watchman for file crawling
// watchman: true,
};
11 changes: 9 additions & 2 deletions browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
"react-scripts": "5.0.0",
"react-three-scissor": "^1.0.0",
"sanitize-html": "^2.6.1",
"showdown": "^2.0.0-alpha",
"stream-browserify": "^3.0.0",
"three": "^0.135.0",
"tippy.js": "^6.3.7",
"typescript": "^4.4.2",
"validator": "^13.7.0",
"web-vitals": "^2.1.0",
"web3modal": "^1.9.5",
"webpack": "^5.66.0"
Expand All @@ -67,6 +69,7 @@
"start": "ESLINT_NO_DEV_ERRORS='true' TSC_COMPILE_ON_ERROR=true rescripts start",
"build": "DISABLE_ESLINT_PLUGIN='true' TSC_COMPILE_ON_ERROR=true rescripts build",
"test": "rescripts test",
"jest": "jest",
"eject": "react-scripts eject",
"lint": "npx eslint ./ --fix --ext .js,.jsx,.ts,.tsx"
},
Expand All @@ -83,10 +86,12 @@
]
},
"devDependencies": {
"@babel/preset-env": "^7.16.11",
"@types/react-helmet": "^6.1.5",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"autoprefixer": "^10.4.0",
"babel-jest": "^27.4.6",
"common": "link:../server/common/",
"eslint": "^8.5.0",
"eslint-config-airbnb": "^19.0.4",
Expand All @@ -97,9 +102,11 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^27.4.7",
"postcss": "^8.4.5",
"prettier": "^2.5.1",
"react-git-info": "^2.0.0",
"tailwindcss": "^3.0.7"
"tailwindcss": "^3.0.7",
"ts-jest": "^27.1.3"
}
}
}
1 change: 0 additions & 1 deletion browser/src/components/ContributionSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { ArweaveContext } from "src/helpers/contexts/ArweaveContext";

import { Converter } from "showdown";


enum Page {
TermsOfUse,
Contribute,
Expand Down
22 changes: 5 additions & 17 deletions browser/src/components/core/Editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
font-size: inherit;
}

.ProseMirror > p::selection{
background: rgba(198, 142, 255, 0.5);
}

.ProseMirror > code {
padding-top: 0;
font-size: inherit;
Expand All @@ -54,21 +50,13 @@
}

.menu {
border: 1px solid black;
border-bottom: 0px;
padding: 0.25rem;
background-color: hsla(0,0%,100%,.1);
border-radius: 0.375rem 0.375rem 0 0;
width: 100%;
display: inline-block;
}

.menuItem {
margin-left: 0.5rem;
margin-right: 0.5rem;
background-color: hsla(0, 0%, 15%, 1);
width:100%;
padding:0.375rem;
position:relative;
border-radius:0.375rem;
}


.linkInput {
font: inherit;
padding-top: 0;
Expand Down
Loading

0 comments on commit 3173bf4

Please sign in to comment.