Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ws): Notebooks 2.0 // Frontend // Workspaces table // Live mockup #140

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions workspaces/frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
6 changes: 6 additions & 0 deletions workspaces/frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"arrowParens": "always",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
}
22 changes: 17 additions & 5 deletions workspaces/frontend/config/stylePaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@ module.exports = {
path.resolve(relativeDir, 'node_modules/@patternfly/patternfly'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-styles/css'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-core/dist/styles/base.css'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-core/dist/esm/@patternfly/patternfly'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css')
]
path.resolve(
relativeDir,
'node_modules/@patternfly/react-core/dist/esm/@patternfly/patternfly',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css',
),
],
};
65 changes: 37 additions & 28 deletions workspaces/frontend/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ module.exports = (env) => {
loader: 'ts-loader',
options: {
transpileOnly: true,
experimentalWatchApi: true
}
}
]
experimentalWatchApi: true,
},
},
],
},
{
test: /\.(svg|ttf|eot|woff|woff2)$/,
Expand All @@ -31,10 +31,16 @@ module.exports = (env) => {
// if they live under a 'fonts' or 'pficon' directory
include: [
path.resolve(relativeDir, 'node_modules/patternfly/dist/fonts'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-core/dist/styles/assets/fonts'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-core/dist/styles/assets/pficon'),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-core/dist/styles/assets/fonts',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-core/dist/styles/assets/pficon',
),
path.resolve(relativeDir, 'node_modules/@patternfly/patternfly/assets/fonts'),
path.resolve(relativeDir, 'node_modules/@patternfly/patternfly/assets/pficon')
path.resolve(relativeDir, 'node_modules/@patternfly/patternfly/assets/pficon'),
],
use: {
loader: 'file-loader',
Expand Down Expand Up @@ -93,30 +99,33 @@ module.exports = (env) => {
path.resolve(relativeDir, 'node_modules/patternfly'),
path.resolve(relativeDir, 'node_modules/@patternfly/patternfly/assets/images'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-styles/css/assets/images'),
path.resolve(relativeDir, 'node_modules/@patternfly/react-core/dist/styles/assets/images'),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css/assets/images'
'node_modules/@patternfly/react-core/dist/styles/assets/images',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css/assets/images'
'node_modules/@patternfly/react-core/node_modules/@patternfly/react-styles/css/assets/images',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css/assets/images'
)
'node_modules/@patternfly/react-table/node_modules/@patternfly/react-styles/css/assets/images',
),
path.resolve(
relativeDir,
'node_modules/@patternfly/react-inline-edit-extension/node_modules/@patternfly/react-styles/css/assets/images',
),
],
type: 'asset/inline',
use: [
{
options: {
limit: 5000,
outputPath: 'images',
name: '[name].[ext]'
}
}
]
name: '[name].[ext]',
},
},
],
},
{
test: /\.s[ac]ss$/i,
Expand All @@ -128,35 +137,35 @@ module.exports = (env) => {
// Compiles Sass to CSS
'sass-loader',
],
}
]
},
],
},
output: {
filename: '[name].bundle.js',
path: path.resolve(relativeDir, 'dist'),
publicPath: ASSET_PATH
publicPath: ASSET_PATH,
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(relativeDir, 'src', 'index.html')
template: path.resolve(relativeDir, 'src', 'index.html'),
}),
new Dotenv({
systemvars: true,
silent: true
silent: true,
}),
new CopyPlugin({
patterns: [{ from: './src/images', to: 'images' }]
})
patterns: [{ from: './src/images', to: 'images' }],
}),
],
resolve: {
extensions: ['.js', '.ts', '.tsx', '.jsx'],
plugins: [
new TsconfigPathsPlugin({
configFile: path.resolve(relativeDir, './tsconfig.json')
})
configFile: path.resolve(relativeDir, './tsconfig.json'),
}),
],
symlinks: false,
cacheWithContext: false
}
cacheWithContext: false,
},
};
};
};
2 changes: 1 addition & 1 deletion workspaces/frontend/config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = merge(common('development'), {
},
proxy: [
{
context: ["/api"],
context: ['/api'],
target: {
host: PROXY_HOST,
protocol: PROXY_PROTOCOL,
Expand Down
20 changes: 10 additions & 10 deletions workspaces/frontend/config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ module.exports = merge(common('production'), {
new TerserJSPlugin({}),
new CssMinimizerPlugin({
minimizerOptions: {
preset: ['default', { mergeLonghand: false }]
}
})
]
preset: ['default', { mergeLonghand: false }],
},
}),
],
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[name].bundle.css'
})
chunkFilename: '[name].bundle.css',
}),
],
module: {
rules: [
{
test: /\.css$/,
include: [...stylePaths],
use: [MiniCssExtractPlugin.loader, 'css-loader']
}
]
}
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
],
},
});
12 changes: 5 additions & 7 deletions workspaces/frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,19 @@ module.exports = {
coverageDirectory: 'coverage',

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

// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'@app/(.*)': '<rootDir>/src/app/$1'
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/fileMock.js',
'@app/(.*)': '<rootDir>/src/app/$1',
},

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

// The test environment that will be used for testing.
testEnvironment: 'jsdom'
testEnvironment: 'jsdom',
};
Loading