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

[wip] interactive: load files into gui (7/7) #1802

Closed
wants to merge 8 commits into from

Conversation

dshaaban01
Copy link
Collaborator

Goal of this PR:

  1. Add ability for users to run xdsl-gui <filename> command to preload a file into gui input textarea
  2. Provide ability inside gui to do this: i.e add textarea where users type file name, add press "load file" and have the specified file loaded in Input TextArea

So far: text area and buttons widgets added for goal 2) but have not made it work yet. Advice/thoughts on this functionality welcome.

image

Copy link
Collaborator

@compor compor left a comment

Choose a reason for hiding this comment

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

Not sure where this is going, but I would have preferred a file browser to pop up here.
I know this is a bigger feature, but now I have to move in and out of the application.
Also, I have no hints on what is the default path for the file I want to load.

Just a comment, so I'm not going to block this.

@@ -301,6 +305,10 @@ def uncondense(self, event: Button.Pressed) -> None:
def remove_last_pass(self, event: Button.Pressed) -> None:
self.pass_pipeline = self.pass_pipeline[:-1]

@on(Button.Pressed, "#load_file_button")
def load_file(self, event: Button.Pressed) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does nothing?

@dshaaban01 dshaaban01 closed this Nov 17, 2023
@dshaaban01 dshaaban01 reopened this Nov 17, 2023
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (12c74e1) 89.14% compared to head (3cbc2e2) 89.14%.

Files Patch % Lines
xdsl/interactive/app.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           dalia/condense.5    #1802      +/-   ##
====================================================
- Coverage             89.14%   89.14%   -0.01%     
====================================================
  Files                   260      260              
  Lines                 32113    32120       +7     
  Branches               4735     4736       +1     
====================================================
+ Hits                  28628    28634       +6     
- Misses                 2789     2790       +1     
  Partials                696      696              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@superlopuh
Copy link
Member

Could you please make this a draft PR until it's ready to review? Makes it a bit easier to prioritise PRs

@dshaaban01 dshaaban01 marked this pull request as draft November 18, 2023 17:25
@webmiche
Copy link
Collaborator

Personally, I would first focus on only the first part before trying to load files while the gui is running. This should be relatively simple by changing the INITIAL_IR_TEXT variable.

@dshaaban01 dshaaban01 closed this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interactive xdsl-gui things tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants