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

Use file list from newtools #655

Merged
merged 20 commits into from Jan 17, 2024

Conversation

hernanmd
Copy link
Collaborator

@hernanmd hernanmd commented Jan 15, 2024

Description

This pull request introduces a new and enhanced file browser with various features aimed at improving user experience and productivity. The file browser includes the following key functionalities:

Open Dialogs

  • For Files: StFBOpenFileDialog open.
  • For Directories: StFBOpenDirectoryDialog open.

File Navigation

StFBFileSystemPresenter open.

Bookmarks:

  • Users can now easily bookmark their frequently accessed directories for quick navigation.

Contextual Menu Operations:

  • For Navigation Table on Selected Item:

    • New Directory
    • Copy File/Directory Name
    • Copy File/Directory Full Path
    • Rename File/Directory
    • Inspect File/Directory
    • Compress File/Directory
    • File in File (if selection is a .st)
    • Open a Changes Browser (if file is a .st)
    • Add Directory Bookmark
  • For Directory Tree:

    • New Directory
    • Rename Selected Directory
    • Remove Selected Directory (takes care of re-parenting to the parent directory)

Note

This initial implementation represents a basic, usable version of the file browser. While it provides valuable features for file management and navigation, there is still room for improvement. Future iterations will focus on enhancing user interface elements, improving performance, and addressing any identified issues.

Hernán Morales Durand and others added 10 commits January 10, 2024 19:08
…c File List. This is implemented in StFBDirectoryTreePresenter.

Update Baseline to load FileBrowser from NewTools by default.
Updated existing FileBrowser examples to use open insteaf of openWithSpec.
Use file system wrappers and utilities from Torsten's Harbour project.
Link directory tree navigation with file list table presenters using transmissions.
Add missinig equality comparators for file system item wrappers.
Rename WindowPath -> Breadcrumb
Add setting to open on last used directory.
Avoid erroneus scrolling for now not setting auto-scroll by default when a path in the breadcrumb is selected.
…ame.

Add commands for directory tree navigation.
Handle re-parent when removing directories in directory tree.
Refactoring.
Cleaning.
@Ducasse
Copy link
Contributor

Ducasse commented Jan 15, 2024

Thanks Hernan. I would like to integrate it and after we iterate if necessary.
Let us wait (not too much) what esteban thinks.

@Ducasse
Copy link
Contributor

Ducasse commented Jan 15, 2024

You commit contains the bug the changes on metaclass fileout introduced and we cannot reproduce.

' {} + TraitedMetaclass'

could you try to reproduce it on a simple example?
It happens only when we save the class.

@estebanlm
Copy link
Member

You commit contains the bug the changes on metaclass fileout introduced and we cannot reproduce.

' {} + TraitedMetaclass'

could you try to reproduce it on a simple example? It happens only when we save the class.

yes, this is a bug from latest changes (I think @guillep knows what's is about?)

@estebanlm estebanlm self-requested a review January 16, 2024 10:12
@estebanlm
Copy link
Member

this is lateral, but important ;)
can you rename StFB prefix with plain "St" ?
(the FB prefix was kept while importing it to our sources, but there is no reason to integrate it like that)

@hernanmd
Copy link
Collaborator Author

You commit contains the bug the changes on metaclass fileout introduced and we cannot reproduce.

' {} + TraitedMetaclass'

could you try to reproduce it on a simple example? It happens only when we save the class.

I will try to, I noticed this happened after I installed a Trait and then I removed it because it was not really useful.
And the next commit included the ' {} + TraitedMetaclass' in the definitions.

@hernanmd
Copy link
Collaborator Author

this is lateral, but important ;) can you rename StFB prefix with plain "St" ? (the FB prefix was kept while importing it to our sources, but there is no reason to integrate it like that)

Removing FB would make some class names very generic, possibly clashing with future names, for example: StFBSettings -> StSettings.

I would follow the prefix in the NewTools Inspector, where StInspector is used as prefix to avoid conflicts in the future, at least for "generic" class names.

@estebanlm
Copy link
Member

Yeah, something like that... but FB sounds horrible :)

Hernán Morales Durand added 5 commits January 16, 2024 17:24
Fix tests which were creating bookmarks without cleaning them.
…s them.

Refactoring bookmarks commands.
Enable Desktop bookmarks.
@Ducasse
Copy link
Contributor

Ducasse commented Jan 16, 2024

tx hernan. Ok I will try to add and remove a trait and save to see if we can generate the bug.

tonel:///home/runner/work/NewTools/NewTools/src

*** Warning: Warning: The following definitions had errors while loading.  Press Proceed to try to load them again (they may work on a second pass):
  StFileDialogPresenter
  StOpenFileOrDirectoryDialog
  StOpenDirectoryDialog
  StOpenFileDialog
  StSaveFileDialog
  StFileBrowserBookmarkCommand
  StFileBrowserAddBookmarkCommand
  StFileBrowserRemoveBookmarkCommand
  StFileBrowserNewDirectoryCommand

NewUndeclaredWarning: StDirectoryTreePresenter class>>buildCommandsGroupWith:forRoot: (StFileBrowserNewDirectoryCommand is Undeclared)
Syntax Error on line 2: 'Variable or expression expected'
=========================================================
1: allIcons
2: 	<script: 'self allIcons inspect'>
    _^_
3: 	^ (Pragma allNamed: 'icons' in: StFileDialogPresenter class)
4: 		flatCollect:
5: 			[ :pragma | pragma methodClass instanceSide perform: pragma methodSelector ]
CodeError:RBSyntaxErrorNotice UndefinedObject>>#DoIt 12:Variable or expression expected->
RBSyntaxErrorNotice(RBNotice)>>signalError
OpalCompiler>>checkNotice:

@hernanmd
Copy link
Collaborator Author

You commit contains the bug the changes on metaclass fileout introduced and we cannot reproduce.
' {} + TraitedMetaclass'
could you try to reproduce it on a simple example? It happens only when we save the class.

I will try to, I noticed this happened after I installed a Trait and then I removed it because it was not really useful. And the next commit included the ' {} + TraitedMetaclass' in the definitions.

Error is raised by classes where class side has

traits: { {} + TraitedClass }

However I cannot edit this in Calypso because it's broken. (I cannot even copy the selection or type any key there)

Screenshot 2024-01-16 at 18 08 43

@Ducasse
Copy link
Contributor

Ducasse commented Jan 16, 2024

Yes this is a bug in the fileout.
We do not succeed to reproduce it. If you can we will fix it.

Add setting to configure the preferred terminal program (only MacOS for now).
Rename StIconCache -> StFileBrowserIconCache.
Fix missing rename.
@hernanmd
Copy link
Collaborator Author

AFAICT failing tests are not related

ReleaseTest
 ✗ #testUndeclared (162ms)
TestFailure: Found undeclared Variables: 
RBRemoveMethodDriver in: StClyMessageListPresenter>>#doRemoveMethod
ReleaseTest(TestAsserter)>>assert:description:resumable:
ReleaseTest(TestAsserter)>>assert:description:
ReleaseTest>>testUndeclared ...assert: remaining isEmpty description: description
ReleaseTest(TestCase)>>performTest
 ✗ #testThatThereAreNoSelectorsRemain...tAreSentButNotImplemented (592ms)
TestFailure: an OrderedCollection('TIceRepositoryReader classTrait>>#id' 'TIceRepositoryWriter classTrait>>#id') should have been empty
ReleaseTest(TestAsserter)>>assert:description:resumable:
ReleaseTest(TestAsserter)>>assert:description:
ReleaseTest(TestAsserter)>>assertEmpty:
ReleaseTest>>testThatThereAreNoSelectorsRemainingThatAreSentButNotImplemented ...assertEmpty: (violations difference: knownFailures)
ReleaseTest(TestCase)>>performTest

ProperMethodCategorizationTest
 ✗ #testNoUncategorizedMethods (11ms)
TestFailure: the following classes have uncategorized methods: an OrderedCollection(BaselineOfWelcomeBrowser MetacelloProjectSpec MetacelloVersionSpec)
ProperMethodCategorizationTest(TestAsserter)>>assert:description:resumable:
ProperMethodCategorizationTest(TestAsserter)>>assert:description:
ProperMethodCategorizationTest>>testNoUncategorizedMethods ...assert: remaining isEmpty description: 'the following classes have uncategorized methods: ' , remaining asString
ProperMethodCategorizationTest(TestCase)>>performTest

@Ducasse Ducasse merged commit 435667d into pharo-spec:Pharo12 Jan 17, 2024
0 of 2 checks passed
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.

None yet

3 participants