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

Pinned panel #4798

Merged
merged 25 commits into from
May 30, 2024
Merged

Pinned panel #4798

merged 25 commits into from
May 30, 2024

Conversation

ioedeveloper
Copy link
Member

@ioedeveloper ioedeveloper commented May 15, 2024

Closes #3787

How it works

This PR introduces the functionality of being able to pin/dock a plugin to a fixed position on the right of the IDE.

  • Each plugin (except the filePanel) have a new icon on the header as indicated in the image below.
Screenshot 2024-05-15 at 15 07 49

NOTE: We would need to discuss the plugins that should have this new icon to pin and unpin plugins.

  • After clicking on the "pin" icon, the plugin should be moved to the right of the IDE.
Screenshot 2024-05-15 at 15 14 17

NOTE: For now, only internal plugins have the ability to maintain state when pinned from left to right and vice-versa. Iframe plugins will have to reload when it switches sides. Also, i have only implemented state persistence for udapp and search plugin, because they are the easiest to implement for now because of how state is managed in this two plugins. Implementing for other internal plugins will involve a lot of code changes, which is out of the scope of this PR.

  • When an icon is pinned, it stays pinned until you unpin the plugin or deactivate the plugin. Even after reload pinned plugins are still pinned.
  • I will add more when i have more to disclose. Have fun testing...

Copy link

netlify bot commented May 15, 2024

Deploy Preview for remixproject ready!

Name Link
🔨 Latest commit fdecbde
🔍 Latest deploy log https://app.netlify.com/sites/remixproject/deploys/665843711758340008c67ff7
😎 Deploy Preview https://deploy-preview-4798--remixproject.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@Aniket-Engg Aniket-Engg left a comment

Choose a reason for hiding this comment

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

  • If a plugin is pinned to right and you try to pin another one, it breaks everything

  • Home tab is kind of sliced, this should be responsive:

Screenshot 2024-05-15 at 8 11 17 PM

@@ -4,6 +4,8 @@
"panel.documentation": "Documentation",
"panel.description": "Description",
"panel.maintainedByRemix": "Maintained by Remix",
"panel.pinnedMsg": "Click to dock plugin to the right",
"panel.unPinnedMsg": "Click to return plugin to the side panel",
Copy link
Collaborator

Choose a reason for hiding this comment

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

may be better to say: Click to return plugin to the left side panel

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree. Maybe even same sentence but with right/left

Copy link
Collaborator

@ryestew ryestew left a comment

Choose a reason for hiding this comment

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

  • When you pin a panel - it pops to the right - but the main panel and the terminal get a ugly scroll bar that is not aligned with each other.
image
  • Learneth should appear on the right side by default. A new user won't know how to pin it.
  • I am not sure pinning is the right word...lets discuss...
  • Also left side panels have the old style of scroll bar - like mentioned above:
image
  • maybe the pin should be an arrow icon:
image

@@ -6,5 +6,7 @@
"panel.maintainedByRemix": "由 Remix 维护",
"panel.pluginInfo": "插件信息",
"panel.linkToDoc": "文档链接",
"panel.makeAnissue": "提交 issue"
"panel.makeAnissue": "提交 issue",
Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't need to add those in all language files. It will take English by default anyway. Just add the label "needs translation".

@@ -34,6 +34,12 @@ pre {
width : 320px;
transition : width 0.25s;
}
.pinnedpanel {
display : flex;
flex-direction : row-reverse;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use bootstrap classes for first two

@LianaHus
Copy link
Collaborator

@ioedeveloper please exclude the plugins you've added from the plugin manager

Copy link
Collaborator

@joeizang joeizang left a comment

Choose a reason for hiding this comment

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

I think it LGTM. In the spirit of small prs and the development process being more iterative, I approve this pr and I think we can have corrections and patches come in later "smaller" prs

@ioedeveloper ioedeveloper added this to In progress in v0.50.0 - Feature Freeze 03/06 via automation May 29, 2024
@ioedeveloper ioedeveloper added the ready-to-review PR ready to review label May 29, 2024
v0.50.0 - Feature Freeze 03/06 automation moved this from In progress to Reviewer approved May 30, 2024
@ioedeveloper ioedeveloper merged commit e664600 into master May 30, 2024
32 checks passed
v0.50.0 - Feature Freeze 03/06 automation moved this from Reviewer approved to Done May 30, 2024
@ioedeveloper ioedeveloper deleted the pinned-panel branch May 30, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-review PR ready to review
Development

Successfully merging this pull request may close these issues.

Proposal for Pinned Tab within Remix-IDE
5 participants