Change slogan and refactor project info naming
The project's slagon has been updated back to "Privacy is sexy" from "Now you have the choice" for enhanced brand clarity and memorability. This change also reflects the community's preference and aligns with the project's established identity. This commit also refactors naming and structure of project information (metadata) struct to enhance clarity and maintainability in relation to changing the slogan. Key changes include: - Update UI components to display the revised slogan. - Remove period from project slogan in code area for consistency with a explanatory comment for future maintainability. - Refactor header container and class names for clarity. - Standardize project metadata usage in `TheCodeArea.vue` to ensure consistency. - Improve code clarity by renaming `IProjectInformation` to `ProjectDetails` and `ProjectInformation` to `GitHubProjectDetails`. - Organize `ProjectDetails` under a dedicated `Project` directory within the domain layer for better structure. These changes are expected to improve the project's appeal and streamline future maintenance and development efforts.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { IApplication } from '@/domain/IApplication';
|
||||
import { ICategoryCollection } from '@/domain/ICategoryCollection';
|
||||
import { OperatingSystem } from '@/domain/OperatingSystem';
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import { ProjectInformationStub } from './ProjectInformationStub';
|
||||
import type { ProjectDetails } from '@/domain/Project/ProjectDetails';
|
||||
import { ProjectDetailsStub } from './ProjectDetailsStub';
|
||||
import { CategoryCollectionStub } from './CategoryCollectionStub';
|
||||
|
||||
export class ApplicationStub implements IApplication {
|
||||
public info: IProjectInformation = new ProjectInformationStub();
|
||||
public projectDetails: ProjectDetails = new ProjectDetailsStub();
|
||||
|
||||
public collections: ICategoryCollection[] = [];
|
||||
|
||||
@@ -24,8 +24,8 @@ export class ApplicationStub implements IApplication {
|
||||
return this;
|
||||
}
|
||||
|
||||
public withProjectInformation(info: IProjectInformation): this {
|
||||
this.info = info;
|
||||
public withProjectDetails(info: ProjectDetails): this {
|
||||
this.projectDetails = info;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import { ProjectInformation } from '@/domain/ProjectInformation';
|
||||
import type { ProjectDetails } from '@/domain/Project/ProjectDetails';
|
||||
import { ICategoryCollection } from '@/domain/ICategoryCollection';
|
||||
import { getEnumValues } from '@/application/Common/Enum';
|
||||
import type { CollectionData } from '@/application/collections/';
|
||||
@@ -10,7 +9,7 @@ import { CategoryCollectionStub } from './CategoryCollectionStub';
|
||||
export class CategoryCollectionParserStub {
|
||||
public readonly arguments = new Array<{
|
||||
data: CollectionData,
|
||||
info: ProjectInformation,
|
||||
projectDetails: ProjectDetails,
|
||||
}>();
|
||||
|
||||
private readonly returnValues = new Map<CollectionData, ICategoryCollection>();
|
||||
@@ -24,8 +23,8 @@ export class CategoryCollectionParserStub {
|
||||
}
|
||||
|
||||
public getStub(): CategoryCollectionParserType {
|
||||
return (data: CollectionData, info: IProjectInformation): ICategoryCollection => {
|
||||
this.arguments.push({ data, info });
|
||||
return (data: CollectionData, projectDetails: ProjectDetails): ICategoryCollection => {
|
||||
this.arguments.push({ data, projectDetails });
|
||||
const foundReturnValue = this.returnValues.get(data);
|
||||
if (foundReturnValue) {
|
||||
return foundReturnValue;
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import type { ProjectDetails } from '@/domain/Project/ProjectDetails';
|
||||
import { ICodeSubstituter } from '@/application/Parser/ScriptingDefinition/ICodeSubstituter';
|
||||
|
||||
export class CodeSubstituterStub implements ICodeSubstituter {
|
||||
private readonly scenarios = new Array<{
|
||||
code: string, info: IProjectInformation, result: string }>();
|
||||
code: string, projectDetails: ProjectDetails, result: string }>();
|
||||
|
||||
public substitute(code: string, info: IProjectInformation): string {
|
||||
const scenario = this.scenarios.find((s) => s.code === code && s.info === info);
|
||||
public substitute(code: string, projectDetails: ProjectDetails): string {
|
||||
const scenario = this.scenarios.find(
|
||||
(s) => s.code === code && s.projectDetails === projectDetails,
|
||||
);
|
||||
if (scenario) {
|
||||
return scenario.result;
|
||||
}
|
||||
return `[CodeSubstituterStub] - code: ${code}`;
|
||||
}
|
||||
|
||||
public setup(code: string, info: IProjectInformation, result: string) {
|
||||
this.scenarios.push({ code, info, result });
|
||||
public setup(code: string, projectDetails: ProjectDetails, result: string) {
|
||||
this.scenarios.push({ code, projectDetails, result });
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
22
tests/unit/shared/Stubs/ProjectDetailsParserStub.ts
Normal file
22
tests/unit/shared/Stubs/ProjectDetailsParserStub.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { parseProjectDetails } from '@/application/Parser/ProjectDetailsParser';
|
||||
import { IAppMetadata } from '@/infrastructure/EnvironmentVariables/IAppMetadata';
|
||||
import type { ProjectDetails } from '@/domain/Project/ProjectDetails';
|
||||
import { ProjectDetailsStub } from './ProjectDetailsStub';
|
||||
|
||||
export class ProjectDetailsParserStub {
|
||||
public readonly arguments = new Array<IAppMetadata | undefined>();
|
||||
|
||||
private returnValue: ProjectDetails = new ProjectDetailsStub();
|
||||
|
||||
public withReturnValue(value: ProjectDetails): this {
|
||||
this.returnValue = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public getStub(): typeof parseProjectDetails {
|
||||
return (metadata) => {
|
||||
this.arguments.push(metadata);
|
||||
return this.returnValue;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import type { ProjectDetails } from '@/domain/Project/ProjectDetails';
|
||||
import { Version } from '@/domain/Version';
|
||||
import { VersionStub } from './VersionStub';
|
||||
|
||||
export class ProjectInformationStub implements IProjectInformation {
|
||||
export class ProjectDetailsStub implements ProjectDetails {
|
||||
public name = 'stub-name';
|
||||
|
||||
public version = new VersionStub();
|
||||
@@ -21,37 +21,37 @@ export class ProjectInformationStub implements IProjectInformation {
|
||||
|
||||
public slogan = 'stub-slogan';
|
||||
|
||||
public withName(name: string): ProjectInformationStub {
|
||||
public withName(name: string): this {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withVersion(version: Version): ProjectInformationStub {
|
||||
public withVersion(version: Version): this {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withRepositoryUrl(repositoryUrl: string): ProjectInformationStub {
|
||||
public withRepositoryUrl(repositoryUrl: string): this {
|
||||
this.repositoryUrl = repositoryUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withHomepageUrl(homepageUrl: string): ProjectInformationStub {
|
||||
public withHomepageUrl(homepageUrl: string): this {
|
||||
this.homepage = homepageUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withFeedbackUrl(feedbackUrl: string): ProjectInformationStub {
|
||||
public withFeedbackUrl(feedbackUrl: string): this {
|
||||
this.feedbackUrl = feedbackUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withReleaseUrl(releaseUrl: string): ProjectInformationStub {
|
||||
public withReleaseUrl(releaseUrl: string): this {
|
||||
this.releaseUrl = releaseUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public withRepositoryWebUrl(repositoryWebUrl: string): ProjectInformationStub {
|
||||
public withRepositoryWebUrl(repositoryWebUrl: string): this {
|
||||
this.repositoryWebUrl = repositoryWebUrl;
|
||||
return this;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import { parseProjectInformation } from '@/application/Parser/ProjectInformationParser';
|
||||
import { IAppMetadata } from '@/infrastructure/EnvironmentVariables/IAppMetadata';
|
||||
import { IProjectInformation } from '@/domain/IProjectInformation';
|
||||
import { ProjectInformationStub } from './ProjectInformationStub';
|
||||
|
||||
export class ProjectInformationParserStub {
|
||||
public readonly arguments = new Array<IAppMetadata | undefined>();
|
||||
|
||||
private returnValue: IProjectInformation = new ProjectInformationStub();
|
||||
|
||||
public withReturnValue(value: IProjectInformation): this {
|
||||
this.returnValue = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public getStub(): typeof parseProjectInformation {
|
||||
return (metadata) => {
|
||||
this.arguments.push(metadata);
|
||||
return this.returnValue;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ export class UseApplicationStub {
|
||||
public get(): ReturnType<typeof useApplication> {
|
||||
return {
|
||||
application: this.application,
|
||||
info: this.application.info,
|
||||
projectDetails: this.application.projectDetails,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user