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

Edit readme to include forced overrides functionability #2233

Merged

Conversation

alexvuong
Copy link
Collaborator

Description

Edit readme to include force overrides functionality and some minor change

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1)

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@alexvuong alexvuong requested a review from a team as a code owner January 31, 2025 23:19
In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions.
To do this, create a `.forced_overrides` dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable.

Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions.
Copy link
Collaborator

@adamraya adamraya Feb 1, 2025

Choose a reason for hiding this comment

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

I'd also note that this should used as a temporary workaround while seeking a proper extensibility solution. Like we mention in the file docs.

// USE ONLY AS A TEMPORARY SOLUTION TO URGENTLY PATCH/UPDATE AN EXTENSION.

@@ -107,6 +107,12 @@ Now when the base application is built the import for the `logo.ts` in `extensio

This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file.

#### Forced overrides
In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions.
To do this, create a `.forced_overrides` dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable.
Copy link
Collaborator

Choose a reason for hiding this comment

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

optional nit: expand on how to specify the files

Suggested change
To do this, create a `.forced_overrides` dot file at the root of your base project and list the files you intend to override. Any files specified in this list will be treated as overridable.
To do this, create a `.forced_overrides` dot file at the root of your base project, list the files you intend to override, starting with the extension package name. Any files specified in this list will be treated as overridable.

@@ -107,6 +107,12 @@ Now when the base application is built the import for the `logo.ts` in `extensio

This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file.

#### Forced overrides
In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

optional nit: rephrasing a bit

Suggested change
In a case when it is necessary to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass the restrictions.
Sometimes, you may need to override files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass these restrictions.

@alexvuong alexvuong added the skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated label Feb 1, 2025
@@ -107,6 +107,12 @@ Now when the base application is built the import for the `logo.ts` in `extensio

This mechanism is useful when you want to allow for fine grained customization of your application extension. Its the responsibility of the extension developer to ensure their document what files are overridable and what the expected input and output of those files are. For example, if the overridable file is a React component you should document the props that get passed to that component and the expected exports of the file.

#### Forced overrides
Copy link
Contributor

Choose a reason for hiding this comment

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

To match how other headings are capitalized:

Suggested change
#### Forced overrides
#### Forced Overrides

Sometimes, you may need to override some files from an extension but the extension developers do not allow those files to be overridden, you can use `forced_overrides` to bypass these restrictions.
To do this, create a `.forced_overrides` dot file at the root of your base project, list the files you intend to override, starting with the extension package name. Any files specified in this list will be treated as overridable.

Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Note: It is advisable to use this function with caution since it could potential break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension.
Note: It is advisable to use this function with caution since it could potentially break intended behavior of installed extensions. This should be used as a temporary solution to urgently patch/update an extension.

@alexvuong alexvuong merged commit 45a9d79 into feature/extensibility-v2 Feb 3, 2025
27 checks passed
@kevinxh
Copy link
Collaborator

kevinxh commented Feb 5, 2025

I wish the section contains an example to explain the format, i.e. it has to be relative path etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants