eclipse-platform / eclipse.platform.ui

Eclipse Platform
https://projects.eclipse.org/projects/eclipse.platform
Eclipse Public License 2.0
78 stars 162 forks source link

Find/replace overlay: find-dialog are resized unnormally if it is used for MD-files #2147

Closed speckyspooky closed 1 month ago

speckyspooky commented 1 month ago

Steps to reproduce

I use the eclipse version 2024-09. The problem is when the Find/Replace-dialo will be opend on an md-file the sizing of the dialog is unnormally huge. Additional on it there is a difference between the "Markdown Source" and the "Preview". If the find dialog is started at the preview-register a mix of old and new search is shown.

MD-file, "Markdown Source" register, opened find-dialog

grafik

MD-file, "Preview" register, opened find-dialog

grafik

Tested under this environment:

merks commented 1 month ago

I’ve seen that too. I’m not sure if that’s a Mylyn problem. It’s always been a problem that two find dialogs open depending on which tab is open.

HeikoKlare commented 1 month ago

Thank you for reporting that issue. It is still reproducible with recent I-Builds? We have fixed several problem with respect to to sizing and placement since M1, so the issue might have been already been resolved. Do you have any extensions installed for opening the markdown file? I would like to reproduce the issue, but with the given information I was not yet able to do so.

merks commented 1 month ago

Here's a trick that I use to get something else into the target platform. Use Navigate -> Open Setup -> Workspace and copy and paste this text onto the Workspace instance and save it:

<?xml version="1.0" encoding="UTF-8"?>
<setup.targlets:TargletTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup.targlets="http://www.eclipse.org/oomph/setup/targlets/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/targlets/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/SetupTarglets.ecore">
  <targlet name="Mylyn">
    <requirement
        name="org.eclipse.mylyn.wikitext.feature.feature.group"/>
    <repositoryList>
      <repository
          url="https://download.eclipse.org/mylyn/updates/nightly/latest"/>
    </repositoryList>
  </targlet>
</setup.targlets:TargletTask>

Then use Help -> Perform Setup Tasks to perform the Modular Targlet tasks, with such that the Mylyn feature is in the target platform. Launch a runtime workspace with this feature included in the launch. Then you can open a *.md file with the Mylyn editor to see how it works with the latest SDK source.

HeikoKlare commented 1 month ago

Thank you, @merks! With your trick, I was able able to reproduce the issue within the blink of an eye :-)

@speckyspooky the issue you reported is still present in the current development state. It reveals a bug in the find/replace overlay implementation. Thanks again for reporting it! I have proposed a fix in #2154.

Note that this will not have any effect on the different find/replace UIs in the source and preview tabs, which is because the source tab uses the Eclipse-integrated search functionality while the preview tab uses the browser-integrated one (IE or Edge, depending on what is used). Just like before, the find/replace bar of one tab will stay open when switching to the other tab, which seems to be caused by the Mylyn markdown editor not using a multi-page editor but some "custom" implementation for showing multiple tabs.

speckyspooky commented 1 month ago

Thanks for your fast fixing!