Skip to content

Commit

Permalink
Merge pull request #748 from nextcloud/vue-rewrite
Browse files Browse the repository at this point in the history
Major rewrite of the UI with Vue JS.
Thanks to
@JonathanTreffler 
@jancborchardt 
@devlinjunker 

And all others that made this possible
  • Loading branch information
Grotax authored Oct 24, 2023
2 parents d423ca5 + 02c9fff commit b60ba4a
Show file tree
Hide file tree
Showing 194 changed files with 36,605 additions and 31,547 deletions.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.{js,php,html}]
[*.{php,html,css}]
indent_style = space
indent_size = 4
charset = utf-8

[*.{js,ts,vue}]
indent_style = tab
indent_size = 4
charset = utf-8

[*.bats]
indent_style = space
indent_size = 2
Expand Down
51 changes: 48 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,52 @@
// SPDX-FileCopyrightText: Carl Schwan <[email protected]>
// SPDX-License-Identifier: AGPL-3.0-or-later
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
ts: '@typescript-eslint/parser',
},
ecmaVersion: 2020,
},
env: {
jest: true,
},
extends: [
'eslint:recommended',
'plugin:vue/base',
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended',
'@nextcloud',
]
'plugin:@typescript-eslint/recommended',
],
ignorePatterns: ['*.d.ts', 'l10n/*.js'],
rules: {
'no-console': 'warn',
'@typescript-eslint/no-var-requires': 'off',

// TODO: Trouble importing .ts files into .vue files for some reason?
'import/extensions': 'off',
'n/no-missing-import': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts'],
},
},
},
overrides: [
{
files: ['*spec.ts', 'tests/javascript/unit/setup.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['src/store/*.ts'],
rules: {
'function-paren-newline': ['error', 'multiline'],
},
},
],
}
6 changes: 1 addition & 5 deletions .github/workflows/api-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.0', '8.1']
nextcloud: ['stable26', 'stable27']
nextcloud: ['stable27']
database: ['sqlite', 'pgsql', 'mysql']
experimental: [false]
include:
Expand All @@ -41,10 +41,6 @@ jobs:
nextcloud: pre-release
database: sqlite
experimental: true
- php-versions: 8.2
nextcloud: stable26
database: sqlite
experimental: false
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.1']
nextcloud: ['stable26', 'stable27']
nextcloud: ['stable27']
database: ['sqlite']
experimental: [false]
codecoverage: [false]
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Lint

on:
pull_request:
push:
branches:
- master

jobs:
eslint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

name: eslint node${{ matrix.node-versions }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-versions }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-versions }}

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

stylelint:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

name: stylelint node${{ matrix.node-versions }}
steps:
- uses: actions/checkout@v2

- name: Set up node ${{ matrix.node-versions }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-versions }}

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run stylelint
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
composer.phar
node_modules/
vendor/
js/build
*.log
/build/
/js/coverage/
js/*.xml
js/
.rvm
*.clover
.phpunit.result.cache
site/
coverage

#bats
tests/api/helpers/settings-override.bash
tests/test_helper/feeds/test.xml
tests/test_helper/feeds/feed1.xml
tests/test_helper/feeds/feed2.xml

#bats
tests/api/helpers/settings-override.bash
Expand Down Expand Up @@ -55,6 +60,9 @@ RCS/*
# netbeans
nbproject

# vscode
.vscode

# phpStorm
.idea

Expand Down
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
coverage/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), older entries don't fully match.

# Unreleased
## [25.x.x]
### Changed
- Vue Rewrite
# Releases
## [24.x.x]
### Changed
- Set User Agent for curl in Scraper
Expand Down
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ npm:
$(npm) ci
$(npm) run build
ifneq (, $(npm))
cd js && $(npm) run build
$(npm) run build
else
@echo "npm command not available, please install nodejs first"
@exit 1
Expand Down Expand Up @@ -173,7 +173,7 @@ appstore:
# on macOS there is no option "--parents" for the "cp" command
mkdir -p $(appstore_sign_dir)/$(app_name)/js/build $(appstore_sign_dir)/$(app_name)/js/admin
cp js/build/app.min.js $(appstore_sign_dir)/$(app_name)/js/build
cp js/build/news-admin-settings.js* $(appstore_sign_dir)/$(app_name)/js/build
cp js/nextcloud-news-admin-settings.js* $(appstore_sign_dir)/$(app_name)/js/build

# export the key and cert to a file
@if [ ! -f $(cert_dir)/$(app_name).key ] || [ ! -f $(cert_dir)/$(app_name).crt ]; then \
Expand Down Expand Up @@ -205,12 +205,7 @@ php-test-dependencies:

.PHONY: unit-test
unit-test:
@if [ "$(CODECOVERAGE)" = "true" ]; then \
./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover build/php-unit.clover; \
else \
./vendor/phpunit/phpunit/phpunit -c phpunit.xml --no-coverage; \
fi

./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover build/php-unit.clover

# Command for running JS and PHP tests. Works for package.json files in the js/
# and root directory. If phpunit is not installed systemwide, a copy is fetched
Expand All @@ -233,4 +228,4 @@ feed-server:

.PHONY: nextcloud-server
nextcloud-server:
php -S 127.0.0.1:8080 -t $(CURDIR)/../../.
php -S 127.0.0.1:8080 -t $(CURDIR)/../../.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Report a [feed issue](https://github.com/nextcloud/news/discussions/new)
<lib>json</lib>

<owncloud max-version="0" min-version="0"/>
<nextcloud min-version="26" max-version="27"/>
<nextcloud min-version="27" max-version="27"/>
</dependencies>

<background-jobs>
Expand Down
11 changes: 6 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-FileCopyrightText: Carl Schwan <[email protected]>
// SPDX-License-Identifier: AGPL-3.0-or-later
const babelConfig = require('@nextcloud/babel-config')

module.exports = babelConfig
module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import',
],
presets: ['@babel/preset-env', '@babel/preset-typescript'],
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b60ba4a

Please sign in to comment.