Bug 1781794 - Scrolling in the new templates editor scrolls the preview as well (and vice versa)
Summary: Scrolling in the new templates editor scrolls the preview as well (and vice v...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Roman Plevka
Depends On:
TreeView+ depends on / blocked
Reported: 2019-12-10 15:38 UTC by Radovan Drazny
Modified: 2020-04-14 13:28 UTC (History)
4 users (show)

Fixed In Version: foreman-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-14 13:28:06 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28624 0 Normal Closed Scrolling in the new templates editor scrolls the preview as well (and vice versa) 2020-10-12 09:04:56 UTC
Red Hat Bugzilla 1718077 0 unspecified CLOSED [RFE] Implement a new templates editor 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:28:34 UTC

Description Radovan Drazny 2019-12-10 15:38:10 UTC
Description of problem:
When you use the new templates editor, trying to edit and preview template changes is quite unergonomic. 

Version-Release number of selected component (if applicable):
Sat 6.7 Snap 5

How reproducible:

Steps to Reproduce:
1. Have a host registered to the Satellite 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.

Comment 4 Ondřej Pražák 2020-01-03 06:57:56 UTC
Created redmine issue https://projects.theforeman.org/issues/28624 from this bug

Comment 5 Bryan Kearney 2020-02-18 09:03:46 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28624 has been resolved.

Comment 7 Roman Plevka 2020-03-02 10:51:11 UTC
on sat6.7.0-14

the tabs are no longer synced and remember their own pointer positions.

Comment 10 errata-xmlrpc 2020-04-14 13:28:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.