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

chore: remove mds theme #401

Merged
merged 15 commits into from
Dec 17, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: "Gradle: Validate Gradle Wrapper"
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
uses: gradle/actions/wrapper-validation@v3
- name: "Gradle: Build"
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
env:
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
- name: "Gradle: Validate Gradle Wrapper"
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
uses: gradle/actions/wrapper-validation@v3
- name: "Gradle: Generate TypeScript Library Code"
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
env:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md).
#### Major

- The Catalog Crawler has been moved to the AP repository.
- Removed MDS theme and MDS specific flags in the UI.

#### Minor

Expand Down Expand Up @@ -60,6 +61,9 @@ please see [changelog_updates.md](docs/dev/changelog_updates.md).
# Direct URL to the UPDATE_PASSWORD required action in Keycloak
AUTHORITY_PORTAL_FRONTEND_UPDATE_PASSWORD_URL: https://[KC_FQDN]/realms/authority-portal/protocol/openid-connect/auth?response_type=code&client_id=oauth2-proxy&scope=openid&kc_action=UPDATE_PASSWORD&redirect_uri=[AP_FQDN_URL_ENCODED]%2Foauth2%2Fcallback
```
- Removed variables:
- `AUTHORITY_PORTAL_FRONTEND_IFRAME_URL`
- The MDS theme is no longer available, so configurations using `mds-open-source` will revert to the default sovity theme

#### Compatible Versions

Expand Down
1 change: 0 additions & 1 deletion authority-portal-frontend/.env.local-dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ AUTHORITY_PORTAL_FRONTEND_LOGIN_URL=https://this-is-your-keycloak-login-url
AUTHORITY_PORTAL_FRONTEND_LOGOUT_URL=https://this-is-your-keycloak-logout-url
AUTHORITY_PORTAL_FRONTEND_INVALIDATE_SESSION_COOKIES_URL=https://your-session-is-invalidated-now.com
AUTHORITY_PORTAL_FRONTEND_USE_FAKE_BACKEND=true
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL=https://mobility-dataspa-5n9px2qi7r.live-website.com/mds-news
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL=https://privacy-policy-url/
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL=https://legal-notice-url
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL=https://support-url
Expand Down
7 changes: 3 additions & 4 deletions authority-portal-frontend/.env.local-e2e-dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ AUTHORITY_PORTAL_FRONTEND_LOGIN_URL=https://this-is-your-keycloak-login-url
AUTHORITY_PORTAL_FRONTEND_LOGOUT_URL=https://this-is-your-keycloak-logout-url
AUTHORITY_PORTAL_FRONTEND_INVALIDATE_SESSION_COOKIES_URL=https://your-session-is-invalidated-now.com
AUTHORITY_PORTAL_FRONTEND_USE_LOCAL_BACKEND=true
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL=https://mobility-dataspa-5n9px2qi7r.live-website.com/mds-news
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL=https://mobility-dataspace.online/privacy-policy-mds-portal/
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL=https://mobility-dataspace.eu/legal-notice
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL=https://support.mobility-dataspace.eu
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL=https://sovity.de/en/privacy-policy/
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL=https://sovity.de/en/imprint/
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL=https://support.sovity.de/
AUTHORITY_PORTAL_FRONTEND_ACTIVE_PROFILE=sovity-open-source
AUTHORITY_PORTAL_FRONTEND_BRAND_SHORT_NAME=sovity
AUTHORITY_PORTAL_FRONTEND_PORTAL_DISPLAY_NAME=Authority Portal
Expand Down
18 changes: 0 additions & 18 deletions authority-portal-frontend/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {DashboardPageComponent} from './pages/dashboard-page/dashboard-page/dash
import {LoadingPageComponent} from './pages/empty-pages/loading-page/loading-page/loading-page.component';
import {PageNotFoundPageComponent} from './pages/empty-pages/page-not-found-page/page-not-found-page/page-not-found-page.component';
import {UnauthenticatedPageComponent} from './pages/empty-pages/unauthenticated-page/unauthenticated-page/unauthenticated-page.component';
import {HomePageComponent} from './pages/home/home/home.component';
import {ParticipantOwnConnectorDetailPageComponent} from './pages/participant-own-connector-detail-page/participant-own-connector-detail-page/participant-own-connector-detail-page.component';
import {ParticipantOwnConnectorListPageComponent} from './pages/participant-own-connector-list-page/participant-own-connector-list-page/participant-own-connector-list-page.component';
import {OrganizationCreatePageComponent} from './pages/registration-pages/organization-create-page/organization-create-page/organization-create-page.component';
Expand Down Expand Up @@ -94,23 +93,6 @@ export const CATALOG_REDIRECTS: Routes = REDIRECT_TO_HOME.map((path) => ({
pathMatch: 'full',
}));

export const HOME_REDIRECTS: Routes = REDIRECT_TO_HOME.map((path) => ({
path,
redirectTo: (() => getProperRedirectUrl('home'))(),
pathMatch: 'full',
}));

export const FEATURE_HOME_ROUTE: Routes = [
{
path: 'home',
component: HomePageComponent,
data: {
requiresRole: ['USER'] satisfies UserRoleDto[],
},
canActivate: [requiresRole],
},
];

export const FEATURE_DASHBOARD_ROUTE: Routes = [
{
path: 'dashboard',
Expand Down
2 changes: 0 additions & 2 deletions authority-portal-frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import {DashboardPageModule} from './pages/dashboard-page/dashboard.module';
import {LoadingPageModule} from './pages/empty-pages/loading-page/loading-page.module';
import {PageNotFoundPageModule} from './pages/empty-pages/page-not-found-page/page-not-found-page.module';
import {UnauthenticatedPageModule} from './pages/empty-pages/unauthenticated-page/unauthenticated-page.module';
import {MdsHomePageModule} from './pages/home/home.module';
import {ParticipantOwnConnectorDetailPageModule} from './pages/participant-own-connector-detail-page/participant-own-connector-detail-page.module';
import {ParticipantOwnConnectorListPageModule} from './pages/participant-own-connector-list-page/participant-own-connector-list-page.module';
import {OrganizationCreatePageModule} from './pages/registration-pages/organization-create-page/organization-create-page.module';
Expand Down Expand Up @@ -107,7 +106,6 @@ import {SharedModule} from './shared/shared.module';
ControlCenterUserProfilePageModule,
DashboardPageModule,
LoadingPageModule,
MdsHomePageModule,
OrganizationCreatePageModule,
OrganizationOnboardPageModule,
OrganizationPendingPageModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
AUTHORITY_PORTAL_ROUTES,
CATALOG_REDIRECTS,
FEATURE_DASHBOARD_ROUTE,
FEATURE_HOME_ROUTE,
HOME_REDIRECTS,
LOADING_ROUTES,
ONBOARDING_ROUTES,
PENDING_ROUTES,
Expand All @@ -41,9 +39,7 @@ export class RouteConfigService {
AUTHORITY_PORTAL: AUTHORITY_PORTAL_ROUTES,
};

defaultRoute = this.activeFeatureSet.isHomePageEnabled()
? '/home'
: '/catalog';
readonly defaultRoute = '/catalog';

constructor(
private router: Router,
Expand Down Expand Up @@ -93,9 +89,7 @@ export class RouteConfigService {
const existingChildren = rootRoute.children || [];

// Add home route depending on feature set
const newChildren = this.activeFeatureSet.isHomePageEnabled()
? [...existingChildren, ...HOME_REDIRECTS, ...FEATURE_HOME_ROUTE]
: [...existingChildren, ...CATALOG_REDIRECTS];
const newChildren = [...existingChildren, ...CATALOG_REDIRECTS];

// Add additional routes depending on feature set & configuration
if (this.activeFeatureSet.isDashboardEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ import {UiFeature} from './profiles/ui-feature';
export class ActiveFeatureSet {
constructor(@Inject(APP_CONFIG) private config: AppConfig) {}

usesMdsId(): boolean {
return this.has('mds-id');
}

usesBritishCatalogue(): boolean {
return this.has('catalogue');
}

isHomePageEnabled(): boolean {
return this.has('enable-home');
}

// This is configurable via environment variable, not via theme
isDashboardEnabled(): boolean {
return this.config.enableDashboard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export interface AppConfig {
privacyPolicyUrl: string;
legalNoticeUrl: string;
supportUrl: string;
iframeUrl: string;

backendUrl: string;
loginUrl: string;
Expand All @@ -75,7 +74,6 @@ export interface AppConfigEnv {
AUTHORITY_PORTAL_FRONTEND_USE_FAKE_BACKEND: string;
AUTHORITY_PORTAL_FRONTEND_USE_LOCAL_BACKEND: string;
AUTHORITY_PORTAL_FRONTEND_INVALIDATE_SESSION_COOKIES_URL: string;
AUTHORITY_PORTAL_FRONTEND_IFRAME_URL?: string;
AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL: string;
AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL: string;
AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL: string;
Expand Down Expand Up @@ -108,8 +106,6 @@ export function buildAppConfig(envVars: AppConfigEnv): AppConfig {
envVars.AUTHORITY_PORTAL_FRONTEND_USE_FAKE_BACKEND === 'true',
useLocalBackend:
envVars.AUTHORITY_PORTAL_FRONTEND_USE_LOCAL_BACKEND === 'true',

iframeUrl: envVars.AUTHORITY_PORTAL_FRONTEND_IFRAME_URL ?? '',
privacyPolicyUrl: envVars.AUTHORITY_PORTAL_FRONTEND_PRIVACY_POLICY_URL,
legalNoticeUrl: envVars.AUTHORITY_PORTAL_FRONTEND_LEGAL_NOTICE_URL,
supportUrl: envVars.AUTHORITY_PORTAL_FRONTEND_SUPPORT_URL,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
* sovity GmbH - initial implementation
*/

export type UiColorTheme = 'theme-sovity' | 'theme-mds';
export type UiColorTheme = 'theme-sovity';
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@
*/

export type UiFeature =
// Replaces 'Organization ID' with MDS ID. Keep in mind that the actual ID format is generated by the backend and needs to be configured there
| 'mds-id'

// Enables the homepage. If this is not enabled, the default page will be the Catalog
| 'enable-home'

// Show an iFrame on the homepage. The URL needs to be configured in the theme. Requires 'enable-home'
| 'iframe-in-home'

// Replaces 'Catalog' with 'Catalogue'
| 'catalogue'

// Enables the 'Powered by sovity' footer to be used in instances hosted by sovity
| 'powered-by-sovity'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
* Contributors:
* sovity GmbH - initial implementation
*/
import {MDS_FEATURES} from './feature-sets/mds-features';
import {inferUiProfileType} from './infer-ui-profile-type';
import {MDS_THEME, SOVITY_THEME} from './ui-theme-data';
import {SOVITY_THEME} from './ui-theme-data';

/**
* List of available profiles.
Expand All @@ -24,8 +23,4 @@ export const UI_PROFILE_DATA = inferUiProfileType({
...SOVITY_THEME,
features: new Set(),
},
'mds-open-source': {
...MDS_THEME,
features: new Set([...MDS_FEATURES]),
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,3 @@ export const SOVITY_THEME: UiThemeConfig = {
caasResellerBrandLogoSrc: 'assets/images/sovity_caas_logo.svg',
copyrightCompanyName: 'sovity GmbH',
};

export const MDS_THEME: UiThemeConfig = {
theme: 'theme-mds',
brandFaviconSrc: 'assets/images/logo_light.svg',
brandLogo: {src: 'assets/images/mds_logo_yellow.svg', class: 'scale-100'},
brandLogoSmall: {
src: '/assets/images/mds_logo_no_text.svg',
class: 'scale-[0.7]',
},
brandLogoUnauthenticatedPage: {
src: 'assets/images/mds_logo_black.svg',
class: 'scale-150 mb-14',
},
brandLogoOnboardingPage: {
src: '/assets/images/mds_logo_black.svg',
class: '',
},
connectorSelfOwnedIconSrc: 'assets/images/mds_self-hosted-connector_logo.svg',
connectorCaasIconSrc: 'assets/images/mds_request-caas_logo.svg',
caasResellerBrandLogoSrc: 'assets/images/mds_caas_logo.svg',
copyrightCompanyName: 'DRM Datenraum Mobilität GmbH',
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {takeUntil} from 'rxjs/operators';
import {Store} from '@ngxs/store';
import {ConnectorOverviewEntryDto} from '@sovity.de/authority-portal-client';
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set';
import {SlideOverService} from 'src/app/core/services/slide-over.service';
import {sliderOverNavigation} from 'src/app/core/utils/helper';
import {getConnectorsTypeClasses} from 'src/app/core/utils/ui-utils';
Expand Down Expand Up @@ -63,11 +62,8 @@ export class AuthorityConnectorListPageComponent implements OnInit, OnDestroy {
private globalStateUtils: GlobalStateUtils,
private slideOverService: SlideOverService,
private titleService: Title,
private activeFeatureSet: ActiveFeatureSet,
) {
this.activeFeatureSet.usesMdsId()
? this.titleService.setTitle('MDS Connectors')
: this.titleService.setTitle('All Connectors');
this.titleService.setTitle('All Connectors');
}

ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
<th
class="py-3.5 pl-4 text-sm font-bold text-gray-700 text-left"
scope="col">
{{
('mds-id' | isActiveFeature) ? 'MDS ID' : 'Organization ID'
}}
Organization ID
</th>
<th
class="py-3.5 px-4 text-sm font-bold text-left text-gray-700"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
OrganizationRegistrationStatusDto,
UserRoleDto,
} from '@sovity.de/authority-portal-client';
import {ActiveFeatureSet} from 'src/app/core/services/config/active-feature-set';
import {SlideOverService} from 'src/app/core/services/slide-over.service';
import {sliderOverNavigation} from 'src/app/core/utils/helper';
import {getOrganizationRegistrationStatusClasses} from 'src/app/core/utils/ui-utils';
Expand Down Expand Up @@ -76,11 +75,8 @@ export class AuthorityOrganizationListPageComponent
private slideOverService: SlideOverService,
private globalStateUtils: GlobalStateUtils,
private titleService: Title,
private activeFeatureSet: ActiveFeatureSet,
) {
this.activeFeatureSet.usesMdsId()
? this.titleService.setTitle('MDS Organizations')
: this.titleService.setTitle('Participant Management');
this.titleService.setTitle('Participant Management');
}

ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
import {GlobalStateUtils} from 'src/app/core/global-state/global-state-utils';
import {LocalStoredValue} from 'src/app/core/utils/local-stored-value';
import {DeploymentEnvironmentUrlSyncService} from '../../../core/global-state/deployment-environment-url-sync.service';
import {ActiveFeatureSet} from '../../../core/services/config/active-feature-set';
import {HeaderBarConfig} from '../../../shared/common/header-bar/header-bar.model';
import {AssetDetailDialogService} from '../asset-detail-dialog/asset-detail-dialog.service';
import {FilterBoxItem} from '../filter-box/filter-box-item';
Expand Down Expand Up @@ -69,18 +68,13 @@ export class CatalogPageComponent implements OnInit, OnDestroy {

catalogType = this.route.snapshot.data.catalogType;

catalogSpelling = this.activeFeatureSet.usesBritishCatalogue()
? 'Catalogue'
: 'Catalog';

constructor(
private assetDetailDialogService: AssetDetailDialogService,
private store: Store,
private route: ActivatedRoute,
private router: Router,
private globalStateUtils: GlobalStateUtils,
private deploymentEnvironmentUrlSyncService: DeploymentEnvironmentUrlSyncService,
private activeFeatureSet: ActiveFeatureSet,
private titleService: Title,
) {
this.setTitle();
Expand Down Expand Up @@ -198,10 +192,8 @@ export class CatalogPageComponent implements OnInit, OnDestroy {
environmentId: this.route.snapshot.queryParams.environmentId,
},
});
// BreadcrumbService builds the name from the URL which is nonsensical in casse of asset IDs
document.title = `${this.activeFeatureSet.usesMdsId() ? 'MDS ' : ''}${
this.catalogSpelling
} - Data Offer`;
// BreadcrumbService builds the name from the URL which is nonsensical in case of asset IDs
this.titleService.setTitle('Catalog - Data Offer');
}

private changeUrlToCatalogRoot() {
Expand Down Expand Up @@ -266,26 +258,21 @@ export class CatalogPageComponent implements OnInit, OnDestroy {
if (isMyDataOffers) {
return {
title: 'My Data Offers',
subtitle: `${this.catalogSpelling} of your public Data Offers`,
subtitle: `Catalog of your public Data Offers`,
headerActions: [],
};
}

return {
title: this.catalogSpelling,
subtitle: `${this.catalogSpelling} of all public Data Offers`,
title: 'Catalog',
subtitle: `Catalog of all public Data Offers`,
headerActions: [],
};
}

private setTitle() {
let title;
this.catalogType === 'my-data-offers'
? this.titleService.setTitle('My Data Offers')
: this.titleService.setTitle(
`${this.activeFeatureSet.usesMdsId() ? 'MDS ' : ''}${
this.catalogSpelling
}`,
);
: this.titleService.setTitle('Catalog');
}
}
Loading
Loading