Patched a bug with WrittenContent popovers and added popovers to Art Forms#29
Open
uptudev wants to merge 3 commits intorobertjanetzko:masterfrom
Open
Patched a bug with WrittenContent popovers and added popovers to Art Forms#29uptudev wants to merge 3 commits intorobertjanetzko:masterfrom
uptudev wants to merge 3 commits intorobertjanetzko:masterfrom
Conversation
* `server/server.go` - Fixed a small typo which caused a panic upon hovering over a WrittenContent entity, which would attempt to load `templates/popoverWrittencontent.html` instead of `templates/popoverWrittenContent.html`.
* `model/model.go` - Added method on art form structs to get the short description; simply calls `ArtFormShortDesc()` in `util/util.go`. * `server/server.go` - Added routing for new popover HTML. * `templates/layout.html` - Added popover script to objects of art form type. + `templates/popoverDanceForm.html` - Added popover HTML for Dance Forms + `templates/popoverMusicalForm.html` - Added popover HTML for Musical Forms + `templates/popoverPoeticForm.html` - Added popover HTML for Poetic Forms * `util/util.go` - Added a function to get the short description for Art Forms from the XML description.
* **Modified**: `util/util.go` - Accidentally left the index offset in from when the whole first sentence was returned during prototyping; fixed.
Contributor
Author
|
Here is an example of the error affecting the |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Noticed a bug with the popovers on Written Content, and went ahead and implemented popovers on Dance, Musical, and Poetic Forms while I was at it. Currently the Art Form popovers do not highlight the author civilization or historical figure, as I would likely need to do something way more intensive to retain that information; it isn't kept in the XML files, sadly. Currently it trims some words from the first sentence of the Art Form's description.
Bug Details (Fixed in PR)
When hovering over an object of the type
WrittenContent, instead of the intended popover displaying, the server panics and logs a message to the console aboutpopoverWrittencontent.htmlbeing missing; the correct file ispopoverWrittenContent.html(with a capital 'C').Changelog
Fixed WrittenContent popover bug
server/server.go- Fixed the typo which caused the above webserver panic.Implemented popovers for Art Forms
model/model.go- Added method on art form structs to get the short description; simply callsArtFormShortDesc()inutil/util.go.server/server.go- Added routing for new popover HTML.templates/layout.html- Added popover script to objects of art form type.templates/popoverDanceForm.html- Added popover HTML for Dance Formstemplates/popoverMusicalForm.html- Added popover HTML for Musical Formstemplates/popoverPoeticForm.html- Added popover HTML for Poetic Formsutil/util.go- Added a function to get the short description for Art Forms from the XML description.