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

Pop out a page into a new tab (like inspector in new window). DO NOT INTEGRATE #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seandenigris
Copy link

@seandenigris seandenigris commented Oct 14, 2020

2020-10-14T213339048682-0400

I "half" implemented it, but there are so many entry points into Coder (forClass:, forObject:, forPackage:, forCoder: - what could that last one even mean!?) that I'm not sure how to complete it, so I arbitrarily implemented the case where a class is selected (see #newPopOutButton). Maybe some double dispatch is warranted...

UPDATE: Now opens in tab instead of window.
Also, it opens in a new window because that's what inspector does, but would a new tab be better? Not sure but the advantage of the latter is that AFAICT it's easy to go from tab -> window via the UI, but not the reverse.

… INTEGRATE.

I "half" implemented it, but there are so many entry points into Coder (forClass:, forObject:, forPackage:, forCoder: - what could that last one even mean!?) that I'm not sure how to complete it, so I arbitrarily implemented the case where a class is selected. Maybe some double dispatch is warranted...
Still only works for class selection, and needs to be refactored.
@seandenigris
Copy link
Author

The last commit changed to opening in a tab instead of a window.

Outstanding questions:

  1. To where can the code to open in tab be extracted? It is now duplicated between here and coder opening via tools section (see GtHomeSection>>#showSpaceWithTitle:with:from:. Namely:
    aSpace title: 'Coder'. "This is still useful because, although the title will be set even without it, it prevents a blank tab label from flashing until that happens"
    "aSpace extent: 1200@600." "This seems unneeded"
    aSpace addChild: "GtCoderStencil new" (GtCoder new"forClass: self navigationModel selectedClass") createInPager maximized .
    aSpace withHalos.
    self  showSpace: aSpace
    
  2. Can Coder entry points i.e. creation methods be unified? Utilizing double dispatch would allow the above to use something like GtCoderStencil new target: MyClass and then
    GtCoder>>#for: anObject
        ^ self forCoder: anObject newClassCoder
    
    Class>>#newClassCoder
        ^ GtClassCoder forClass: self
    
    Object>>#newCoder
        ^ GtClassCoder forObject: self
    
    etc. The GtClassCoder instance creation methods could be similarly refactored, but you get the idea...
  3. Should inspector be changed to pop out into a tab instead of a window? Wasn't sure if @girba's preference for tab applied there too....

@seandenigris seandenigris changed the title Pop out a page into a new window (like in inspector). DO NOT INTEGRATE Pop out a page into a new tab (like inspector in new window). DO NOT INTEGRATE Oct 15, 2020
@seandenigris
Copy link
Author

Bump :) I know you're doing a Coder pass. It would be great to have this functionality. The pieces are all in this issue. @girba @syrel

@girba
Copy link
Member

girba commented Nov 3, 2020

Yes, this will happen.

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.

2 participants