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

Minimized frame doesn't retain title #434

Closed
kayila opened this issue Apr 13, 2019 · 8 comments
Closed

Minimized frame doesn't retain title #434

kayila opened this issue Apr 13, 2019 · 8 comments
Assignees
Labels
bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.

Comments

@kayila
Copy link
Contributor

kayila commented Apr 13, 2019

Describe the bug
If a frame has a title, where the title is different from the frame id, the pinned and minimized tab name reflects the frame ID rather than the title of the frame.

To Reproduce

  1. Create a macro with the following code:
[frame("abcde"): {
<html>
<head><title>Some title</title></head>
<body>Thing</body>
</html>
}]
  1. Run the macro, observe the created title of the frame.
  2. Pin the frame to the side of the MT window
  3. Hide the frame, notice that the 'name' of the tab does not reflect the title of the frame.

Expected behavior
Minimized frames will keep the same title as when they are opened.

Screenshots
image
image
image

MapTool Info

  • Version: 1.5.1
  • Install: All

Desktop (please complete the following information):

  • OS: Windows, Linux
@Merudo
Copy link
Member

Merudo commented Aug 21, 2019

Could this be an issue with the Jide docking framework?

@Phergus
Copy link
Contributor

Phergus commented Aug 21, 2019

Seems likely. Does MT even have code for handling hiding/minimizing of frames? Thought that was all done by JIDE.

@Azhrei
Copy link
Member

Azhrei commented Aug 21, 2019

There may be a call into the JIDE API that allows setting the text that should appear when the panel isn't being displayed and we're probably not calling it. Or maybe when calling setTitle() (or whatever JIDE calls it) there's a second parameter that we're not passing.

It does seem like something that the application should be able to specify...

@Merudo
Copy link
Member

Merudo commented Aug 21, 2019

Thanks for the hint, @Azhrei. I found out in the documentation that setTabTitle(String) needs to be called separately.

Should we have tabTitle as another parameter or should we have tabTitle=title everywhere?

@Azhrei
Copy link
Member

Azhrei commented Aug 21, 2019

I'd go with making them the same. The only issue is that the "tabTitle" should probably be a much shorter string...

Merudo added a commit to Merudo/maptool that referenced this issue Aug 22, 2019
- Fix: minimized frames now retain their title instead of reverting to the frame name
- Add new frame parameter "tabtitle" to specify the tabbed title of a frame
- HTML tag "<title>" ovverides both the title and the tabtitle
- Close RPTools#434
@Merudo
Copy link
Member

Merudo commented Aug 22, 2019

My PR #602 implements the following behavior:

  • The <title> tag sets both the title and the tabtitle to a value
  • By default, a frame will have the same tabbed title as its title
  • A new parameter tabtitle is added to frame(). By specifying this and not using <title>, a frame can have a tabbed title different from its actual title

Seems to me like a reasonable compromise between simplicity and flexibility.

Examples:

  1. [frame("Frame Test", "title=my title; tabtitle=my tab title"): {} ]
    will have "my title" as a title and "my tab title" as a tab title.

  2. [frame("Frame Test", "title=my title"): {} ]
    will have "my title" as both title and tab title.

[frame("Frame Test", "title=my title; tabtitle=my tab title"): {
<html><head>
<title>my html title</title>
</head></html>
} ]

will have "my html title" as both title and tab title.

@Phergus Phergus added bug documentation needed Missing, out-of-date or bad documentation macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) labels Aug 22, 2019
@Merudo
Copy link
Member

Merudo commented Aug 22, 2019

Documentation added to https://lmwcs.com/rptools/wiki/frame_(roll_option)

@Phergus
Copy link
Contributor

Phergus commented Aug 22, 2019

Tested with original macro and with new functionality. Working as described.

@Phergus Phergus closed this as completed Aug 22, 2019
@Phergus Phergus added tested This issue has been QA tested by someone other than the developer. and removed documentation needed Missing, out-of-date or bad documentation labels Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug macro changes This issue adds or changes macro functions. Extra work is required (testing, wiki, code editor) tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

No branches or pull requests

4 participants