-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: rename blocks from lr to uc #698
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe recent updates involve a comprehensive renaming effort, shifting from the "LR" prefix to "UC" across the documentation, components, and styling files. This change enhances consistency and clarity throughout the codebase, standardizing references to components and maintaining compatibility with the new naming convention. Overall, the modifications streamline the structure while preserving the functionality of the components involved. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UC_Component as UC Component
participant UC_Config as UC Config
User->>UC_Component: Use UC component
UC_Component->>UC_Config: Retrieve configuration
UC_Config-->>UC_Component: Provide settings
UC_Component-->>User: Render output
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
if (!name) { | ||
super.reg(); | ||
return; | ||
} | ||
super.reg(name.startsWith(TAG_PREFIX) ? name : TAG_PREFIX + name); | ||
if (name.startsWith(TAG_PREFIX)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we could drop all this prefixing stuff out of here and simply register blocks with the provided name. All the prefixing is done on the registerBlocks
level.
'lr-external-source': any; | ||
'lr-cloud-image-editor-activity': any; | ||
'lr-cloud-image-editor-block': CustomElement< | ||
'uc-crop-frame': any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should leave both lr and uc prefixes here. Also it would be cool to have a typing test for it.
@@ -1,9 +1,9 @@ | |||
import svgIconsSprite from '../blocks/themes/lr-basic/svg-sprite.js'; | |||
import svgIconsSprite from '../blocks/themes/uc-basic/svg-sprite.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont forget to mention this path in the migration guides
README.md
Outdated
@@ -71,59 +71,59 @@ We use [JSDoc type annotations](https://www.typescriptlang.org/docs/handbook/int | |||
|
|||
```html | |||
<script type="module"> | |||
import * as LR from 'https://cdn.jsdelivr.net/npm/@uploadcare/blocks@{{PACKAGE_VERSION}}/web/blocks.min.js'; | |||
import * as UC from 'https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/blocks.min.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace @{{PACKAGE_VERSION}}
to @1
abstract/Block.js
Outdated
@@ -14,7 +14,8 @@ import { l10nProcessor } from './l10nProcessor.js'; | |||
import { sharedConfigKey } from './sharedConfigKey.js'; | |||
import { A11y } from './a11y.js'; | |||
|
|||
const TAG_PREFIX = 'lr-'; | |||
const TAG_PREFIX = 'uc-'; | |||
const LEGACY_TAG_PREFIX = 'lr-'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really not sure about this compatibility thing, let's discuss again today :)
0b1e4de
to
154537d
Compare
Description
Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Style
Chores