-
Notifications
You must be signed in to change notification settings - Fork 21
sync: from linuxdeepin/dtkdeclarative #259
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
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#489
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin pr auto review代码审查意见:
|
Reviewer's GuideSync upstream dtkdeclarative changes: replace the ScrollView implementation with a template-based variant that incorporates D.ScrollBar, refine TextArea implicit sizing logic, update the example’s width assignment to be reactive, and integrate ScrollView into the chameleon theme. Sequence Diagram for Reactive Width Update in ViewQMLSourcesequenceDiagram
participant UserCode as "User Code (ViewQMLSource.qml)"
participant CP as codePreview
participant QB as "Qt.binding()"
participant Obj as obj
UserCode ->> Obj: obj.width = Qt.binding(function(){return codePreview.width})
activate QB
QB ->> CP: Access width property reference
CP -->> QB: Return width property reference
QB ->> Obj: Establish binding for obj.width to codePreview.width
deactivate QB
Obj ->> Obj: obj.width now reflects codePreview.width
UserCode ->> CP: codePreview.width changes (e.g. due to layout)
CP ->> CP: Internal width property updated
CP -->> QB: Notify property change (via QML Engine)
activate QB
QB ->> CP: Get new width value
CP -->> QB: Return new width
QB ->> Obj: Update obj.width with new value
deactivate QB
Obj ->> Obj: obj.width is updated automatically
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @deepin-ci-robot - I've reviewed your changes - here's some feedback:
- The new chameleon/ScrollView.qml stub is currently empty; either implement its styling or remove it to avoid shipping a non-functional component.
- Consider extracting the duplicated implicitWidth/implicitHeight calculations in ScrollView.qml and TextArea.qml into a shared helper to reduce code duplication.
- In ViewQMLSource.qml you bind obj.width but leave height static – binding height as well would ensure the preview adapts fully to its container.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Synchronize source files from linuxdeepin/dtkdeclarative.
Source-pull-request: linuxdeepin/dtkdeclarative#489
Summary by Sourcery
Synchronize upstream QML components from linuxdeepin/dtkdeclarative, updating ScrollView and TextArea layouts, example bindings, and integrating ScrollView into the chameleon plugin.
Enhancements: