Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Chore: Relocates "media-type-root" to under "workspace" #19245

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

leekelleher
Copy link
Member

Description

Aligns the folder structure of the "media-types" sub-package with "document-types", by relocating the "media-type" and "media-type-root" to under the "workspace" folder.

No functional changes. Exports should remain intact.

@Copilot Copilot AI review requested due to automatic review settings May 6, 2025 13:53
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reorganizes the folder structure by relocating the “media-type” and “media-type-root” packages under the “workspace” folder, aligning them with the “document-types” structure.

  • Updates relative import paths in multiple files to reflect the new locations.
  • Refactors manifests and index/constant exports for consistency.
  • Removes an obsolete workspace manifest entry in the tree manifests.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
media-type-workspace-view-structure.element.ts Adjusted import path for the input element component to the new structure.
media-type-workspace.context.ts Updated relative import paths for entity, types, and constants.
media-type/manifests.ts Added manifests reflecting the new workspace configuration.
media-type/index.ts Updated exports to route through the new media-type module.
media-type/constants.ts Created new constant exports for the workspace alias and context.
media-type-root/manifests.ts Adjusted import path for the entity to match the new folder location.
manifests.ts (workspace) Consolidated manifests by merging media-type and media-type-root arrays.
index.ts (workspace) Updated export to reference the new media-type index file.
constants.ts (workspace) Re-exported constants from both media-type and media-type-root modules.
tree-item-children/manifests.ts Corrected import path for the media-type-root workspace alias.
tree/manifests.ts Removed an obsolete workspace manifest for media-type-root.
constants.ts (media-types) Removed re-export of media-type-root constants to reflect the new location.
Comments suppressed due to low confidence (2)

src/Umbraco.Web.UI.Client/src/packages/media/media-types/workspace/media-type/views/structure/media-type-workspace-view-structure.element.ts:2

  • Verify that the updated relative import path reflects the new file structure consistently.
import type { UmbInputMediaTypeElement } from '../../../../components/input-media-type/input-media-type.element.js';

src/Umbraco.Web.UI.Client/src/packages/media/media-types/tree/tree-item-children/manifests.ts:6

  • Confirm that the revised import path for UMB_MEDIA_TYPE_ROOT_WORKSPACE_ALIAS aligns with the new location of media-type-root.
import { UMB_MEDIA_TYPE_ROOT_WORKSPACE_ALIAS } from '../../workspace/media-type-root/constants.js';

@leekelleher leekelleher changed the title Chore: Relocated "media-type-root" to under "workspace" Chore: Relocates "media-type-root" to under "workspace" May 6, 2025
@madsrasmussen
Copy link
Contributor

Hi @leekelleher

I personally think we should move in the opposite direction. Instead of relocating media-type-root into workspaces, we should create a media-type folder with a workspace underneath.

This change would also allow us to split the path.ts, entity.ts, entity actions, and so on into their respective areas.

I believe this separation will provide a clearer distinction between the files 🙂

@leekelleher
Copy link
Member Author

I personally think we should move in the opposite direction. Instead of relocating media-type-root into workspaces, we should create a media-type folder with a workspace underneath.

Okay, that's good with me. I'd assumed that "document-types" was the structure to follow (for content type workspaces). I'm happy to re-organise it. 👍

@leekelleher leekelleher marked this pull request as draft May 6, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants