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

feat!: make UI extensions easier #1257

Merged
merged 1 commit into from
Jul 12, 2024
Merged

feat!: make UI extensions easier #1257

merged 1 commit into from
Jul 12, 2024

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Jul 4, 2024

This PR redesigns the UI rendering architecture. Each component is now tab-specific, which will allow for easier implementation of dual pane through plugins in the future.

The linemode has been abstracted into a separate component, enabling users to extend it more easily.

Entity, Linemode, and Status components now have new children_add and children_remove methods, allowing developers to add other subcomponents to them based on presets, and this also makes multiple linemodes possible (e.g., displaying both file permissions and modification time).

⚠️ Breaking changes

  • Deleted the Manager, Folder, and File component
  • render() methods no longer take any parameters
  • The function signature Status.style() has been changed to Status:style()

This mainly affects users who use the "full border" on the tips page - it's now a standalone plugin and no longer needs manual patching. Check it out at https://github.com/yazi-rs/plugins/tree/main/full-border.yazi.

And here is an example of the linemode and status bar extension, #1288 (comment)

@sxyazi sxyazi changed the title feat: make UI extensions easier feat!: make UI extensions easier Jul 5, 2024
@sxyazi sxyazi changed the title feat!: make UI extensions easier [WIP] feat!: make UI extensions easier Jul 5, 2024
@sxyazi sxyazi mentioned this pull request Jul 5, 2024
1 task
@sxyazi sxyazi mentioned this pull request Jul 8, 2024
1 task
@sxyazi sxyazi merged commit efb086e into main Jul 12, 2024
6 checks passed
@sxyazi sxyazi deleted the pr-473170ef branch July 12, 2024 10:32
@sxyazi sxyazi changed the title [WIP] feat!: make UI extensions easier feat!: make UI extensions easier Jul 12, 2024
sxyazi added a commit that referenced this pull request Jul 12, 2024
sxyazi added a commit to yazi-rs/plugins that referenced this pull request Jul 12, 2024
sxyazi added a commit that referenced this pull request Jul 12, 2024
sxyazi added a commit that referenced this pull request Jul 13, 2024
sxyazi added a commit that referenced this pull request Jul 13, 2024
sxyazi added a commit that referenced this pull request Jul 13, 2024
sxyazi added a commit to yazi-rs/plugins that referenced this pull request Jul 13, 2024
dedukun added a commit to dedukun/relative-motions.yazi that referenced this pull request Jul 14, 2024
dedukun added a commit to dedukun/bookmarks.yazi that referenced this pull request Jul 14, 2024
@saumyajyoti
Copy link

Hi @sxyazi ,
I see the plugin for showing oh-my-posh prompt is broken with latest updates. Any change needed in header prompt rendering handling? https://github.com/saumyajyoti/omp.yazi

@sxyazi
Copy link
Owner Author

sxyazi commented Jul 15, 2024

@saumyajyoti Raised a PR saumyajyoti/omp.yazi#1

Rolv-Apneseth pushed a commit to Rolv-Apneseth/starship.yazi that referenced this pull request Jul 15, 2024
saumyajyoti added a commit to saumyajyoti/omp.yazi that referenced this pull request Jul 15, 2024
@saumyajyoti
Copy link

@saumyajyoti Raised a PR saumyajyoti/omp.yazi#1

Thanks @sxyazi . the issue is resolved now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants