Yury Bondarenko
762e4616cc
Manual fix: sync removed imports between tests and components
...
The automatic migration made it so HTML always uses the `Themed*` component, and it must therefore be imported in all standalone components that use it.
Afterwards, many unit tests fail because the removed imports no longer match up (can't inject `ThemeService`).
While we could try to support this as part of the automatic migration, there are too many edge cases for this to be consistent.
2024-03-28 18:52:06 +01:00
Yury Bondarenko
0b9741d252
Manual fix: update i/o for ThemedConfigurationSearchPageComponent
...
Fixes compile-time errors due to out-of-sync inputs and outputs between ThemedConfigurationSearchPageComponent and SearchComponent
(note that this is was an existing problem in the source code that flew under the radar until we flipped the selector convention!)
2024-03-28 18:52:06 +01:00
Yury Bondarenko
6051b82821
Automatically migrate to new themeable component convention
2024-03-28 18:33:46 +01:00
Yury Bondarenko
e40b6ae612
Update plugins to support standalone components
...
- ThemedComponent wrappers should always import their base component. This ensures that it's always enough to only import the wrapper when we use it.
- This implies that all themeable components must be standalone
→ added rules to enforce this
→ updated usage rule to improve declaration/import handling
2024-03-28 18:33:46 +01:00
Yury Bondarenko
568574585b
Workaround/document edge case where node can't be found by token
2024-03-21 10:35:04 +01:00
Yury Bondarenko
6e22b5376a
Make rules more type-safe
2024-03-21 10:11:04 +01:00
Yury Bondarenko
b0758c23e5
Enforce plugin structure and generate documentation
2024-03-21 10:11:04 +01:00
Yury Bondarenko
e83a0cd741
Fix lint lint issues
2024-03-21 10:11:04 +01:00
Yury Bondarenko
ae50780e28
Enable linting for the lint plugins
2024-03-21 10:11:04 +01:00
Yury Bondarenko
9a27db3835
Lint e2e tests, enforce selectors
2024-03-21 10:11:04 +01:00
Yury Bondarenko
13e9808df2
Don't enforce ThemedComponent selectors in test HTML
2024-03-21 10:11:04 +01:00
Yury Bondarenko
3937be13f2
Custom ESLint rules to enforce new ThemedComponent selector convention
...
The following cases are covered:
- ThemedComponent wrapper selectors must not start with ds-themed-
- Base component selectors must start with ds-base-
- Themed component selectors must start with ds-themed-
- The ThemedComponent wrapper must always be used in HTML
- The ThemedComponent wrapper must be used in TypeScript _where appropriate_:
- Required
- Explicit usages (e.g. modal instantiation, routing modules, ...)
- By.css selector queries (in order to align with the HTML rule)
- Unchecked
- Non-routing modules (to ensure the components can be declared)
- ViewChild hooks (since they need to attach to the underlying component)
All rules work with --fix to automatically migrate to the new convention
This covers most of the codebase, but minor manual adjustment are needed afterwards
2024-03-21 10:11:04 +01:00
Tim Donohue
41eccbbfe1
Merge pull request #2750 from 4Science/DURACOM-191
...
Migration to standalone components
2024-03-20 09:36:00 -05:00
Giuseppe Digilio
6704a397bd
[DURACOM-191] Provide routing option properly
2024-03-20 11:56:53 +01:00
Giuseppe Digilio
85292579af
[DURACOM-191] Fix selected tab for the comcol-page-browse-by.component
2024-03-20 11:55:34 +01:00
Giuseppe Digilio
bcf8383daf
[DURACOM-191] Fix issue with edit relationship page
2024-03-20 11:52:45 +01:00
Giuseppe Digilio
2826ff5536
[DURACOM-191] Fix missing import for ngIf and ngFor directive
2024-03-19 18:04:09 +01:00
Giuseppe Digilio
dfad3f3fad
[DURACOM-191] Fix issue with admin workflow page
2024-03-18 21:03:37 +01:00
Giuseppe Digilio
ddd0131c8b
[DURACOM-191] Fix submission-import-external-preview.component
2024-03-18 21:00:37 +01:00
Giuseppe Digilio
41c62e2478
[DURACOM-191] Fix batch import page
2024-03-18 17:57:01 +01:00
Giuseppe Digilio
5b6c174767
[DURACOM-191] Fix withdrawn-reinstate-modal
2024-03-18 17:48:08 +01:00
Giuseppe Digilio
acfcf51e34
[DURACOM-191] Remove DataService decorator
2024-03-18 16:08:35 +01:00
Giuseppe Digilio
b28f99f6bf
[DURACOM-191] Fix resource-policy-target.resolver which still used getDataServiceFor decorator
2024-03-18 16:03:43 +01:00
Giuseppe Digilio
8c55e89b3d
[DURACOM-191] Fix eperson-group-list.component which still used getDataServiceFor decorator
2024-03-18 15:35:34 +01:00
Giuseppe Digilio
7472e6939b
[DURACOM-191] Fix dso-edit-metadata.component which still used getDataServiceFor decorator
2024-03-18 13:45:42 +01:00
Giuseppe Digilio
58512b6eed
[DURACOM-191] Fix test
2024-03-18 11:26:26 +01:00
Giuseppe Digilio
8409853be6
[DURACOM-191] Clean up suggestions-data.service implementation
2024-03-18 09:18:12 +01:00
Giuseppe Digilio
00479132ab
[DURACOM-191] Add missing data service
2024-03-17 19:21:56 +01:00
Giuseppe Digilio
2e8817712a
[DURACOM-191] Fix tests
2024-03-17 17:34:35 +01:00
Giuseppe Digilio
788e44a770
[DURACOM-191] Fix circular dependency
2024-03-17 15:48:05 +01:00
Giuseppe Digilio
f527810545
[DURACOM-191] Fix tests
2024-03-15 19:46:14 +01:00
Giuseppe Digilio
fb47c9698d
Merge remote-tracking branch '4scienceGithub/DURACOM-191' into DURACOM-191
2024-03-15 11:31:20 +01:00
Andrea Barbasso
5fc2ed9213
[DURACOM-191] fix some tests
2024-03-15 10:32:39 +01:00
Giuseppe Digilio
f29e70d8a4
[DURACOM-191] Remove duplicated route path definition
2024-03-15 09:00:09 +01:00
Giuseppe Digilio
762fceecc2
[DURACOM-191] optimize application states providers
2024-03-14 19:54:03 +01:00
Giuseppe Digilio
524f20232d
Merge remote-tracking branch '4scienceGithub/DURACOM-191' into DURACOM-191
2024-03-14 18:44:54 +01:00
Giuseppe Digilio
f53d829337
[DURACOM-191] remove providers already provided in root
2024-03-14 18:44:41 +01:00
Giuseppe Digilio
748febdb88
[DURACOM-191] Provide resolver in root
2024-03-14 18:06:35 +01:00
Andrea Barbasso
4faa4ab77d
[DURACOM-191] fix metadata-import-page.component tests
2024-03-14 17:57:30 +01:00
Andrea Barbasso
1a14f3fb75
[DURACOM-191] fix some tests
2024-03-14 17:24:03 +01:00
Andrea Barbasso
87552ce5d6
Merge remote-tracking branch 'github/DURACOM-191' into DURACOM-191
2024-03-14 16:53:13 +01:00
Giuseppe Digilio
56fc0a7cfb
Merge remote-tracking branch '4scienceGithub/DURACOM-191' into DURACOM-191
2024-03-14 16:52:14 +01:00
Giuseppe Digilio
d72c2848f2
[DURACOM-191] Remove app-routing.module
2024-03-14 16:52:09 +01:00
Giuseppe Digilio
f244ea7160
[DURACOM-191] Fix missing import
2024-03-14 16:51:38 +01:00
Andrea Barbasso
e73e95ebaf
[DURACOM-191] fix some tests and remaining decorator to be removed
2024-03-14 16:51:05 +01:00
Giuseppe Digilio
653de28586
[DURACOM-191] Remove system-wide-alert.module
2024-03-14 16:30:56 +01:00
Andrea Barbasso
f0a0e38302
[DURACOM-191] fix some tests
2024-03-14 16:01:09 +01:00
Giuseppe Digilio
c6cdb99213
[DURACOM-191] Remove submission.module
2024-03-14 15:54:05 +01:00
Giuseppe Digilio
88bcbfc27d
[DURACOM-191] Remove statistics-page.module and statistics.module
2024-03-14 15:48:37 +01:00
Giuseppe Digilio
e630b6cfed
[DURACOM-191] Remove subscriptions-page.module, subscriptions.module.ts and upload.module.ts
2024-03-14 15:32:42 +01:00