Skip to content

Commit

Permalink
Faster buffer switching
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsOnlyBinary committed Nov 22, 2024
1 parent cee6252 commit b310e81
Show file tree
Hide file tree
Showing 16 changed files with 14,220 additions and 9,956 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'yarn'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn up @kiwiirc/eslint-plugin@./build/plugins/eslint-rules

- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --prefer-offline
run: yarn --immutable

- name: Test
run: yarn test
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
2 changes: 2 additions & 0 deletions build/configs/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = (env, argv, config) => {
publicPath: 'auto',
filename: outputFileName,
chunkFilename: outputFileName,
crossOriginLoading: 'anonymous',
},

resolve: {
Expand Down Expand Up @@ -87,6 +88,7 @@ module.exports = (env, argv, config) => {
NODE_ENV: env.NODE_ENV,
},
minify: false,
inject: false,
}),
new CopyPlugin({
patterns: [
Expand Down
31 changes: 21 additions & 10 deletions build/plugins/eslint-rules/class-name-prefix.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
const allowedPrefixes = [
'kiwi-',
'u-',
];

const specialPrefixes = [
// IRC colour classes
'irc-fg-',
'irc-bg-',

// Special exception for google recaptcha - welcome screen.
'g-',
];

const prefixes = [...allowedPrefixes, ...specialPrefixes];

const reportMessage = `Expected class name to start with one of ['${allowedPrefixes.join('\', \'')}'] ({{ class }})`;

module.exports = {
meta: {
docs: {
description: 'html class names must start with `u-` or `kiwi-`',
description: `html class names must start one of ['${allowedPrefixes.join('\', \'')}']`,
category: 'base',
url: null,
},
Expand All @@ -16,17 +34,10 @@ module.exports = {
if (!c || c === 'fa' || c.startsWith('fa-')) {
return;
}
if (
!c.startsWith('kiwi-')
&& !c.startsWith('u-')
// Special exception for google recaptcha - welcome screen.
&& !c.startsWith('g-')
&& !c.startsWith('irc-fg-')
&& !c.startsWith('irc-bg-')
) {
if (prefixes.every((p) => !c.startsWith(p))) {
context.report({
node,
message: 'Expected class name to start with `kiwi-` or `u-` ({{ class }})',
message: reportMessage,
data: {
class: c,
},
Expand Down
4 changes: 2 additions & 2 deletions build/plugins/eslint-rules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kiwi/eslint-plugin",
"version": "1.0.0",
"name": "@kiwiirc/eslint-plugin",
"version": "1.1.0",
"private": true,
"main": "index.js",
"peerDependencies": {
Expand Down
69 changes: 35 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,105 +14,106 @@
"gendocs": "rm -rf srcdocs/ && jsdoc -c jsdoc.json"
},
"dependencies": {
"@babel/runtime-corejs3": "^7.24.8",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@babel/runtime-corejs3": "^7.26.0",
"@fortawesome/fontawesome-svg-core": "^6.7.1",
"@fortawesome/free-regular-svg-icons": "^6.7.1",
"@fortawesome/free-solid-svg-icons": "^6.7.1",
"@fortawesome/vue-fontawesome": "^3.0.8",
"buffer": "^6.0.3",
"compare-versions": "^6.1.1",
"css-vars-ponyfill": "^2.4.9",
"event-emitter": "^0.3.5",
"eventemitter3": "^5.0.1",
"htmlparser2": "^9.1.0",
"i18next": "^23.12.2",
"i18next-http-backend": "^v2.5.2",
"i18next": "^23.16.8",
"i18next-http-backend": "^v2.7.1",
"i18next-vue": "^4.0.0",
"ip-regex": "^5.0.0",
"irc-framework": "^4.13.1",
"irc-framework": "^4.14.0",
"json5": "^2.2.3",
"lodash": "^4.17.21",
"murmurhash3js": "^3.0.1",
"sockjs-client": "^1.6.1",
"stream-browserify": "^3.0.0",
"strftime": "^0.10.3",
"tinycon": "^0.6.8",
"vue": "^3.4.34",
"vue": "^3.5.13",
"vue-virtual-scroller": "^2.0.0-beta.8",
"whatwg-fetch": "^3.6.20",
"xhr": "^2.6.0"
},
"devDependencies": {
"@babel/core": "^7.24.9",
"@babel/eslint-parser": "^7.24.8",
"@babel/plugin-transform-runtime": "^7.24.7",
"@babel/preset-env": "^7.24.8",
"@kiwiirc/eslint-plugin": "file:./build/plugins/eslint-rules/",
"@babel/core": "^7.26.0",
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-transform-runtime": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@kiwiirc/eslint-plugin": "./build/plugins/eslint-rules",
"@soda/friendly-errors-webpack-plugin": "^1.8.1",
"@stylistic/stylelint-plugin": "^2.1.2",
"@vue/compiler-sfc": "^3.4.34",
"@stylistic/stylelint-plugin": "^2.1.3",
"@vue/compiler-sfc": "^3.5.13",
"@vue/eslint-config-airbnb": "^7.0.1",
"@vue/vue3-jest": "^29.2.6",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.3",
"babel-loader": "^9.2.1",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"chalk": "^4.1.2",
"compression-webpack-plugin": "^11.1.0",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.0",
"dotenv": "^16.4.5",
"dotenv-expand": "^11.0.6",
"eslint": "^8.57.0",
"dotenv-expand": "^11.0.7",
"eslint": "^8.57.1",
"eslint-config-standard": "^17.1.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^46.10.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-vue": "^9.27.0",
"eslint-plugin-vue": "^9.31.0",
"eslint-plugin-vuejs-accessibility": "^2.4.1",
"eslint-webpack-plugin": "^4.2.0",
"html-loader": "^5.0.0",
"html-webpack-plugin": "^5.6.0",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.3",
"i18next-conv": "^12.1.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdoc": "^4.0.3",
"jsdoc": "^4.0.4",
"less": "^4.2.0",
"less-loader": "^12.2.0",
"mini-css-extract-plugin": "^2.9.0",
"mini-css-extract-plugin": "^2.9.2",
"npm-run-all": "^4.1.5",
"ora": "^5.4.1",
"portfinder": "^1.0.32",
"postcss": "^8.4.40",
"postcss": "^8.4.49",
"postcss-html": "^1.7.0",
"postcss-loader": "^8.1.1",
"prettier": "^3.3.3",
"prettier-eslint": "^16.3.0",
"prettier-plugin-jsdoc": "^0.4.2",
"rimraf": "^5.0.9",
"sass": "^1.77.8",
"rimraf": "^5.0.10",
"sass": "^1.81.0",
"sass-loader": "^14.2.1",
"style-loader": "^4.0.0",
"stylelint": "^16.7.0",
"stylelint-config-recess-order": "^5.0.1",
"stylelint": "^16.10.0",
"stylelint-config-recess-order": "^5.1.1",
"stylelint-config-recommended": "^14.0.1",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-order": "^6.0.4",
"stylelint-webpack-plugin": "5.0.1",
"vue-eslint-parser": "^8.3.0",
"vue-loader": "^17.4.2",
"vue-style-loader": "^4.1.3",
"webpack": "^5.93.0",
"webpack": "^5.96.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4",
"webpack-dev-server": "^5.1.0",
"webpack-merge": "^6.0.1"
}
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/components/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<server-view :network="network" />
</template>
<template v-else>
<message-list :buffer="buffer" />
<message-list :buffer="buffer" :key="buffer.id" />
<sidebar
v-if="!buffer.isSpecial()"
:network="network"
Expand Down
25 changes: 25 additions & 0 deletions src/components/ContainerHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,31 @@ export default {
opacity: 1;
}
.kiwi-header-option-nicklist {
position: relative;
svg {
height: 22px;
}
}
.kiwi-header-option-nicklist .kiwi-stack {
position: absolute;
bottom: 4px;
padding: 2px 3px 1px 3px;
background-color: white;
transition: background-color 0.3s;
> * {
top: 1px;
}
}
.kiwi-header-option-nicklist.kiwi-header-option--active .kiwi-stack,
.kiwi-header-option-nicklist.kiwi-header-option a:hover .kiwi-stack {
background-color: var(--brand-primary);
}
/* The not joined button */
.kiwi-header-notjoined {
border-radius: 0;
Expand Down
Loading

0 comments on commit b310e81

Please sign in to comment.