The advanced cataloging editor no longer automatically resizes the height of the CodeMirror editor, prior to 22.05 it did. To recreate: 1. Turn on 'EnableAdvancedCatalogingEditor' 2. Go to a record with enough MARC data that it should take up the entire width of your screen, 3. The CodeMirror editor will only be 300px. 4. Prior to 22.05 it would dynamically adjust to the height of your screen.
This is because of how we calculate the adjusted height in the function 'onResize'. If the 'changelanguage' element does not exist then '$('#changelanguage').height()' will be undefined. 1 + undefined == NaN. We cannot change the editor height to NaN. We should check for the existence of the 'changelanguage' and if it is not present change the calculation.
Created attachment 142101 [details] [review] Bug 31863: Account for changelanguage element when adjusting editor height To test: 1. Turn on 'EnableAdvancedCatalogingEditor' 2. Go to a record with enough MARC data that it should take up the entire width of your screen, 3. The CodeMirror editor will only be 300px. 4. Resize your screen, nothing happens to the editor height 5. Apply patch 6. Look at the same record in your editor, the editor should go to the bottom of the page now. Resizing your screen should resize the editor. 7. Have some additional language packs installed, and change the language system pref so the '#changelanguage' option will appear. 8. Make sure the editor height is still being properly set.
Created attachment 142112 [details] [review] Bug 31863: Account for changelanguage element when adjusting editor height To test: 1. Turn on 'EnableAdvancedCatalogingEditor' 2. Go to a record with enough MARC data that it should take up the entire width of your screen, 3. The CodeMirror editor will only be 300px. 4. Resize your screen, nothing happens to the editor height 5. Apply patch 6. Look at the same record in your editor, the editor should go to the bottom of the page now. Resizing your screen should resize the editor. 7. Have some additional language packs installed, and change the language system pref so the '#changelanguage' option will appear. 8. Make sure the editor height is still being properly set. Signed-off-by: David Nind <david@davidnind.com>
Thanks Lucas! I had noticed yesterday when testing another bug, but hadn't yet logged a bug. After installing a language, I noticed that the titles for records aren't displayed in the search results after switching to the language in the staff interface and OPAC (even after a reindex). I'm sure it hasn't done that in the past... so maybe another staff interface bug?
(In reply to David Nind from comment #4) > Thanks Lucas! I had noticed yesterday when testing another bug, but hadn't > yet logged a bug. > > After installing a language, I noticed that the titles for records aren't > displayed in the search results after switching to the language in the staff > interface and OPAC (even after a reindex). > > I'm sure it hasn't done that in the past... so maybe another staff interface > bug? Hey David, Thanks for testing. I am unable to reproduce this problem.
(In reply to Lucas Gass from comment #5) > (In reply to David Nind from comment #4) > > Thanks Lucas! I had noticed yesterday when testing another bug, but hadn't > > yet logged a bug. > > > > After installing a language, I noticed that the titles for records aren't > > displayed in the search results after switching to the language in the staff > > interface and OPAC (even after a reindex). > > > > I'm sure it hasn't done that in the past... so maybe another staff interface > > bug? > > Hey David, > > Thanks for testing. I am unable to reproduce this problem. Katrin said on IRC that this sometimes happens with translations (was for fr-CA), so is not a staff interface related bug.
Created attachment 142411 [details] [review] Bug 31863: Account for changelanguage element when adjusting editor height To test: 1. Turn on 'EnableAdvancedCatalogingEditor' 2. Go to a record with enough MARC data that it should take up the entire width of your screen, 3. The CodeMirror editor will only be 300px. 4. Resize your screen, nothing happens to the editor height 5. Apply patch 6. Look at the same record in your editor, the editor should go to the bottom of the page now. Resizing your screen should resize the editor. 7. Have some additional language packs installed, and change the language system pref so the '#changelanguage' option will appear. 8. Make sure the editor height is still being properly set. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for upcoming 22.05.07
applied to 21.11.x for 21.11.14
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved.