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

Reworking main UI #23

Merged
merged 18 commits into from
Aug 3, 2023
Merged

Conversation

adri09070
Copy link
Collaborator

@adri09070 adri09070 commented Aug 2, 2023

Cleaner UI:

  • Adding informations
    • for each chest, its size is now displayed
    • for each item of a chest, its name, value and class are displayed

image

  • Actions are now disabled when they should be:

image

  • shorter toolbar

    • "Remove all chests" and "remove all items" actions have been moved to their respective contextual menu.
  • adding actions:

    • "Inspect chest" via the chest table's contextual menu

    • "Add chest" is still in the chest's toolbar but is now also in the associated context menu

    • new action "Add item" that opens a pop-up to enter an expression whose result will be stored in the selected chest:

      Before validating the expression:

      before validating expression

      After validating the expression:

      after validating expression

  • custom expandable views, which can be configured via the system settings and/or class settings (and thus via a script):

View without playground or inspector:

View without playground or inspector

View with playground only:

View with playground only

View with inspector only:

View with inspector only

View with playground + inspector:

View with playground and inspector

  • The playground is now pre-filled with code, illustrating briefly how to use Chest's API:

View with playground only

@adri09070
Copy link
Collaborator Author

I reworked fully only the main UI, and not the secondary views (e.g: store / load popup layouts, tree table view).

I think their rework deserve their own PR

@adri09070 adri09070 added the enhancement New feature or request label Aug 2, 2023
@adri09070
Copy link
Collaborator Author

Looks like unrelated tests.

Maybe the random failure in NewTools should have a fix though

{ #category : #accessing }
ChestPresenter class >> showInspector: anObject [

^ ShowInspector := anObject
Copy link
Member

Choose a reason for hiding this comment

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

setters should not return anything specific

Copy link
Collaborator Author

@adri09070 adri09070 Aug 3, 2023

Choose a reason for hiding this comment

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

indeed, the "generate accessors" feature did that

{ #category : #accessing }
ChestPresenter class >> showPlayground: anObject [

^ ShowPlayground := anObject
Copy link
Member

Choose a reason for hiding this comment

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

setters should not return anything specific

add: showPlaygroundContainer;
add: showInspectorContainer expand: false;
yourself.
"showInspectorContainer remove: inspector."
Copy link
Member

Choose a reason for hiding this comment

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

remove comment

showPlaygroundContainer remove: playground.
showPlaygroundButton icon: (self application iconNamed: #disable)
]

{ #category : #helper }
ChestPresenter >> iconManager [
Copy link
Member

Choose a reason for hiding this comment

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

What is the icon manager?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Something that should disappear, I guess: it has no senders

addColumn: (SpStringTableColumn
title: 'Class'
evaluated: [ :association |
association value class printString ])
Copy link
Member

Choose a reason for hiding this comment

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

Are we looking for the class name?
It is better to get it using class name rather than printString, unless printing provides more info.
The problem I see is that the implementation of print string for classes can change (maybe it will never do) and print others things, while it looks like we always want the name.

@StevenCostiou StevenCostiou merged commit fb88f9f into pharo-spec:master Aug 3, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants