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

Adds custom file tab to project widget #61

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

alexhroom
Copy link
Collaborator

This PR adds the Custom Files tab to the project widget. Fixes #45.

@alexhroom alexhroom force-pushed the 45-custom-file-tab branch 4 times, most recently from 7afd79a to ebf2490 Compare November 19, 2024 10:19
@alexhroom alexhroom force-pushed the 45-custom-file-tab branch 4 times, most recently from b39c595 to 4abd925 Compare November 20, 2024 09:27
@alexhroom alexhroom marked this pull request as ready for review November 20, 2024 09:37
@alexhroom alexhroom force-pushed the 45-custom-file-tab branch 3 times, most recently from 0f4422c to c3744d1 Compare November 20, 2024 10:20
Copy link
Contributor

@StephenNneji StephenNneji left a comment

Choose a reason for hiding this comment

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

Looks good so far

I think the filename should be stored as a relative path from the project directory, using an absolute path will make it so the project will not run if it is moved to another directory even though the custom file is in the same directory. Also the DSPC_custom_layers example crashes when I try to set the function because the path is stored as "examples/DSPC_custom_layers" whereas the path should be empty for a file in the same project directory

Also have an issue with the column size, out of the box the function name column clips the text
Screenshot 2024-11-29 135433

Also in edit mode it is possible to resize the columns so the button is not visible
Screenshot 2024-11-29 140255

I also cannot change the size of the name column directly, although the size can change if I change another column. Not sure if this is a bug or something intended but I don't think the behaviour is good as my first instinct is to reduce the size of the largest column then I find out I can't

rascal2/dialogs/custom_file_editor.py Show resolved Hide resolved
rascal2/dialogs/custom_file_editor.py Show resolved Hide resolved
@alexhroom
Copy link
Collaborator Author

@StephenNneji on the section resizes:

  • your 'out of the box' looks quite different to mine - I don't have any clipping:
    Screenshot from 2024-12-09 08-45-53
    and I'm not quite sure what to do about it, because as far as I can see the header view doesn't have an option to resize to fit the header text. I also can't reproduce your button shrinking bug (for me, the edit file column refuses to shrink smaller than the button widget!)

I'm also not quite sure how to make the name column resizable while also having it stretch to fill available space. This is the default behaviour of setStretchLastSection() for the last column but setting the resize policy of an arbitrary column to Stretch disables the interactivity.

@alexhroom alexhroom requested a review from StephenNneji January 6, 2025 13:18
@alexhroom alexhroom merged commit 66b25dd into RascalSoftware:main Jan 6, 2025
10 checks passed
@alexhroom alexhroom deleted the 45-custom-file-tab branch January 6, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a custom file widget for the project window
2 participants