Project

General

Profile

Bug #28624

Scrolling in the new templates editor scrolls the preview as well (and vice versa)

Added by Ondřej Pražák 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Description of problem:
When you use the new templates editor, trying to edit and preview template changes is quite unergonomic.

How reproducible:
always

Steps to Reproduce:
1. Have a host registered to the Foreman server, and set as managed in All Hosts -> <host> -> Edit
2. Create a clone of a template in Hosts -> Provisioning Templates. I used the "Kickstart Default" template.
3. Open the template. The new template editor will open.
4. Scroll to the end of the template. Note the number of the last line. The "Kickstart Default" template has 295 lines as of today.
5. Switch to the Preview tab. You will see a preview of the kickstart file generated from the template for the host registered in the step 1. As the resulting file is usually shorter than the template, the number of lines in the kickstart file will be lower than number of lines in the template. In my case, it was 219.
6. Now switch back to the editor tab. You are not at the end of the file (line 295) anymore, but at the line with the same number as the last line in the kickstart file preview (219).
7. When you scroll to any line in the editor or preview tab, when you switch tabs, the other tab will be scrolled to the same line (or to the end of the file, if there is not enough lines).

Actual results:
The editor and preview areas keep "in sync" regarding the line number currently displayed. That means user editing the template has to scroll all the time to get back to the line he actually wants to edit, and then scroll again to the line displaying the generated text. This makes editing and checking the output preview at the same time virtually impossible.

Expected results:
Editor and preview areas can be scrolled independently of each other, and each remembers its last displayed line.

Associated revisions

Revision fc5f24d8 (diff)
Added by Maria Agaphontzev 6 months ago

Fixes #28624 - Scrolling in the editor scrolls the preview

History

#1 Updated by Avi Sharvit 7 months ago

  • Assignee set to Maria Agaphontzev
  • Subject changed from Scrolling in the new templates editor scrolls the preview as well (and vice versa) to Scrolling in the new templates editor scrolls the preview as well (and vice versa)

#2 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7357 added

#3 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 2.1.0 added

#4 Updated by Maria Agaphontzev 6 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF