Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Release 1.11.0 #605

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Continuous Release 1.11.0 #605

merged 1 commit into from
Apr 2, 2024

Conversation

Splines
Copy link
Member

@Splines Splines commented Apr 2, 2024

* Outsource resize and fullscreen functions for thyme players.

* Outsource chapter functionality of the (normal) thyme player.

* Fix some minor errors and clean up.

* Outsource emergency button to separate file.

* Outsource heatmap functionality to separate JavaScript file.

* Make heatmap a variable of thyme feedback.

* Made some auxiliary functions private.

* Outsource functionaly of the annotation toggle and improve behaviour.

* Outsource some parts of the functionality of thyme which checks if the native HTML player is used or not.

* Improve display manager.

* Outscource video reference into thyme_attributes.js.

* Put element field back into the constructors of buttons such that the ids from the HTML files can be different in different players.

* Remove speed selector from thyme feedback player and adjust some CSS attributes in normal and feedback player.

* Outsource speed selector functionality in separate file.

* Rename update_markers into update_annotations (now also in non-JS-files).

* Remove reference on the video control bar in the java script files as it is not used.

* Outsource global annotation function into a new class called "AnnotationManager".

* Restructure annotation area.

* Fix some properties of the annotation-tool.

* Bring toggle-visible-for-teacher-annotations function (fully) to frontend (Java Script).

* Fix controller method to make the last commit work.

* Rename thyme.js into thyme_player.js.

* Clean up.

* Remove annotationSort() from utility.js as this function is now part of annotation_manager.js.

* Remove function annotationIndex() from utility.js as this function is unused by now.

* Outsource the parts of the thyme player scripts which set up the max time label.

* Code clean up and fix error message for editing annotations.

* Remove comment and made the function sortAnnotations() static.

* Next and previous annotation buttons now consider only valid annotations.

* Move attribute activeAnnotationId to the class AnnotationArea (now save the full annotation instead of just the id).

* Optical and structural improvements of code and fix of updating annotations after submitting the annotation form.

* Rename class Button as Component.

* Outsource hide functionality of the control bar.

* Rename class ControlBar as ControlBarHider and restyle some parts of the code.

* Outsource ia button.

* Outsource ia-close button.

* Replace expressions of the form "$('#' + component.id)" by "$(component)".

* Renamed chapters.js into chapter_manager.js and wrap the functionality into a class.

* Remove function iconClass() as it seems to be used nowhere.

* Made max height of the heatmap a static attribute.

* Outsource chapter functionality into chapter manager class. Remove back button (it'll be added again in a few commits when the chapter manager is well-structured).

* Changed fixed chapters id into an attribute of the chapter manager constructor.

* Remove parameter from nextChapterStart() and previousChapterStart() (current video time can be taken from thymeAttributes).

* Remove chapter class as modelling chapters as objects seems to make the situation more complicated than it is (at least for the moment).

* Remove unused variable from chapter manager.

* Outsource metadata functionality.

* Made metadataBefore() and metadataAfter() private.

* Clean up.

* Add back button again.

* Remove unnecessary variables from thyme editor and fix use of thymeUtility function secondsToTime().

* Change var to let or const in the thyme editor script.

* Add missing ; in for-loop and fix variable declaration.

* Make time in the plus/minus (ten) button variable.

* Replace comment.

* Use play, mute and plus/minus x seconds buttons from the new classes.

* Use seek bar from the new class and fix an event listener.

* Use volume bar from the new class.

* Use setUpMaxTime() from thymeUtility and remove unnecessary time update listener.

* Move dataURLtoBlob() to thymeUtility.

* Outsource add item/reference/screenshot button.

* Rename near_mistake_annotations by num_nearby_mistake_annotations and clean up code.

* Replace find_by_id by find_by.

* Clean up medium model.

* Get rid of unused comment.

* Rename id.

* Change id name.

* Capitalized the German words Du, Deine, etc.

* Fix emergency link feature and made "You need further help? ..." invisible if no link was entered by the teacher.

* Split up thyme CSS.

* Remove global CSS which is not needed.

* Remove duplication of the color map.

* Update annotation area when annotations are updated.

* Fix bad behaviour of ia-button, interactive area and annotation area.

* Replace CoffeeScript by JavaScript in app/views/annotations and clean up. Now, all subcategory radios show the emergency link (before it was only definition).

* Add tooltips for the category radio buttons and for the "post as comment"-field.

* Clean up code.

* Add comment.

* Put thyme player scripts in the thyme folder, separate load of thyme related scripts in application.js and add warning comment.

* Fix missing Latex preview in the annotation modal.

* Lower the opacity of previous/next button in the annotation area if the given annotation ist the first/last of the array.

* Correct language.

* Select necessary annotation attributes in backend, not in frontend.

* Improve interaction between annotation and associated comment.

* Set default value of visible_for_teacher to false, whenever the annotation_status doesn't equal 1 (before it was only set to false if the annotation_status equalled -1).

* Fix wrong/missing annotation subtext in the annotation area.

* Remove warning locales from the form html file and put it into the locales html file.

* Make the annotations in the thyme player appear (uniformly) in the same language as the user language.

* Code clean up.

* Replace text "subtext" by enum "subcategory" in the annotation table in the db.

* Add (sub)category class (+ superclass) to remove hardcoded categories in the (non-view) JavaScript.

* Comment update implies annotation update.

* Change label "Enable emergency button?" and add helpdesk.

* Add case "Thymestamp not found" to update_comments.

* Code clean up.

* Code clean up.

* Fix resize.

* link Commontator::Comment and Annotation models

* Delete unwanted .ruby-version file

* Update pdfcomprezzor to version on mampf-next

* Fix resize and IA bugs.

* Remove "video is not null" check from thyme players.

* Remove test for Internet Explorer

* Set default values for annotations_status

* Update annotations without delay

* Replace plus/minus button by time button.

* Add shortcuts for prev/next annotation.

* Merge together multiple annotation-related migrations

* Improve code comment

* Remove renaming of "this" in JS class

* Redesign "post as comment" checkbox

according to Bootstrap here:
https://getbootstrap.com/docs/5.3/forms/checks-radios/#checks

* Restructure cancel/close buttons

* Improve annotation commontator::comment association

* Code clean up

* Code clean-up

* Replace name "emergency button" by "annotation button"

* Add color check

* Fix comment is nil bug

* Code clean-up

* Add non-null constraint for category

* CSS improvement and bugfix

* Correct locales

* Add null constraint to category in original migration

* Rearrange save button

* Quick fix thyme feedback resize.

* Add non-nil constraint

* Add constraint to AnnotationsController

* Improve code style

* Rename variables to proper camelCase

* Improve code style

* Revert time_stamp.rb

* Remove ==/!= null statements

* Add newline after/before function

* Add comment

* Clean up code/fix bug

* Check timestamp in backend

* Add annotations status check + update

* Fix user authorization

* Reduce complexity of small/large display checks

Also removed deprecated device-width, see:
https://stackoverflow.com/a/18500871/

* Implement locking to prevent unnecessary DB calls

The AnnotationManager should handle its internal state on its own.
Therefore, updateMarkers() now checks if annotations are null
and if they are, it calls updateAnnotations() accordingly,
but only if no other method has already called updateMarkers
recently, e.g. when multiple resize events are fired in a small
period of time. Resource is freed in updateAnnotations.

* Rewrite handling of annotation update

* Use gender-neutral pronoun

* Replace alert() by Bootstrap alert

Used for "Post as comment" warnings.

* Use JQuery syntax and lint file

Note we also use .trigger("change") to trigger event listeners
for the checkbox, otherwise they won't be fired.

* Add tooltip (helpdesk) for category

* Make color picker elements round

* Use paddings instead of line breaks

* Don't show warnings if annotation was posted

* Show further help link in new tab

Also shortened current distinction into different categories
as right now it is not needed.

* Fix unwanted line indentation

* Use bootstrap switch for preview toggle

* Use bootstrap switch for annotation toggle

Also removed unwanted string concatenation artifacts

* Fix alignment of preview column & make more responsive

Note that we did not optimize for very small devices as the annotation tool
cannot be opened there. However, for tablets it should work fine.

* Fix case-sensitive color lookup bug

Due to this bug, one could not create annotations
with the last color (almost white).

* Pause video also when editing an annotation

* Update modal background according to annotation color

When we create a new annotation, a random color is chosen.
TODO: Maybe do this random choice already in the backend,
not just in the frontend.

* Fix another non-capitalized color bug

* Add transition to modal header background color

* Add more restrictive color check

* Don't show toggle if it doesn't do anything

* Put radius to backend

* Add cypress rules to ESLint & ignore some patterns

* Allow usage of tempusDominus global variable

* Ignore JS files with Sprocket syntax

* Further improve rules, e.g. allow common globals

* Ignore sprocket syntax in cable.js

* Autofix all `.js` and `.js.erb` files

Command used:
`yarn run eslint --fix .`

Still 47 problems (27 errors, 20 warnings) after this.

* Fix variables in turbolink fix

* Prepend unused variables with "_"

* Get rid of unused widget variable

* Fix specs comment tab alignment

* Bump active record schema version

This was automatically done when running the pending migrations.

* Run ESLint autofixes

* Hack: Add Thyme & Annotation tool globals to ESLint globals

See the comment in .eslintrc.js for more details for why we do this.

* Rename resize to Resizer to avoid name conflicts

* Show correct modal title.

* Fix duplicate comment bug

* Execute Rubocop safe autocorrect.

* Warn about too long GitHub commit messages (#586)

* Fix safe rubocops (manually)

* Fix unsafe autocorrections

* Fix comment status (#585)

* Reapply first fix for Reader/Media

See discussion on #574 for further details.
Previous PR for this was #576, closed in favor of this one
as this directly branches off the new "dev" branch.

* Correctly show latest post (might be current_user's comment)

* Fix update of unread comments logic in comments controller

* Fix update icon logic and latest post comment

* Simplify latest comment logic

* Improve code comments

* Further improve comments

* Fix wording in comment

* Fix construction of media array & use `.blank?` instead of `.empty?`

* Migrate `unread_comments` flag (fix inconsistencies) (#587)

* Add dummy migration

* Implement migration for unread comment flag

* Remove unnecessary comment

* Declare migration as not idempotent

* Use array.length instead of counting

* Throw error to prevent revert of migration

* Fix severe flaws in unread comments migration

* Simplify Reader retrieval

* Use the more explicit `.nil?` method

* Update migration date

* Fix annoying bug: don't use `.select!` but `.select`

* Polish migration

e.g. update comment, more suitable name for the method etc.

* Rename method according to #585

* Use `.instance_of` (fix unwanted merge artifact)

* Clean up annotation migrations

* Fix wrong table changing in migration & update schema

* Improve annotation area css

* Fix scrollable video bug

* Improve icons in annotation area

* Increase button click area

* Change annotation button icon

* Fix spacing between annotation area buttons

* Add title directly on <a> tags & replace close button

* Fix alignment of video control bar

* Redesign annotation markers (use map pin icon)

* Highlight currently active annotation marker

* Reregister hotkeys also after *edit* modal closes

* Improve styling of annotation button

* Add subtle gradient to video control bar

* Show active annotation marker in front

* Fix ESLint warnings

* Delete duplicate line

* Remove unused variables resp. add underscore

* Delete unnecessary `annotations.coffee` file

* Show new annotation directly in AnnotationArea

* Add shortcut to jump to current annotation

* Make annotation button more prominent

- place it closer to the timeline
- color it with more distinct colors to showcase it

* Show preview by default in annotation modal

* Make delete button id more specific

* Add icons to save/delete in annotation modal

* Improve feedback player (CSS, category toggles etc.)

- CSS: extend from main thyme player instead of copying all CSS styles over
- Register correct shortcut to switch between annotations
- Use bootstrap switches instead of custom-made toggles
- Redesign colors for feedback player category toggles
- Simplify AnnotationCategoryToggle component

* Remove syntax error (duplicated line)

* Remove unnecessary console log

* Fix broken key listeners in feedback player

* Improve positioning of heatmap & toggle spikes as well

* Also show heatmap spikes for "mistake" annotations

* Avoid heatmap being cut off at the sides

* Fix video size in feedback player

* Fix small gap in thyme player resize issue

Instead of jQuery width() and height(), we use
window.innerWidth and window.innerHeight.

* Fix wrong resizing when exiting full screen mode

* Disable annotation key listeners when area closed

* Increase width of timeline in feedback player

Also fixed positioning of other elements on the bottom bar.

* Fix keyboard shortcut abbreviation hint

* Update schema & timestamps for annotation DB migrations

* Ignore other lib paths in autoloading

* Do not load Commontator extension in precompiling

* Get rid of "@extend" in SCSS, use CSS classes instead

* Fix amplitude of heatmap if no annotations are present

* Use string interpolation to construct heatmap string

* Don't rescue `NoDatabaseError`

* Fix nulldb error

* Add "sure to delete" warning in annotation modal

* Change annotation status numbering & activate by default

This is the new labeling:
-1: inherit from lecture
0: disabled
1: enabled

Beforehand it was:
-1: disabled
0: inherit from lecture
1: enabled

However, I think it makes more sense to have 0/1 for disabled/enabled
and leave the -1 for the "inherit" use case.

Also, the "share annotation with lecturer" feature is now enabled by
default for all lectures.

* Rename "Thymestamp" to "Timestamp"

* Update annotation db migration timestamps (one last time)

* Use enum for status in emergency link update

* Prepend emergency link with "https://" if necessary

* Remove unwanted change

---------

Co-authored-by: fosterfarrell9 <[email protected]>
Co-authored-by: Splines <[email protected]>
@Splines Splines added the release label Apr 2, 2024
@Splines Splines marked this pull request as ready for review April 2, 2024 15:14
@Splines Splines changed the title Continous Release 1.11 Continous Release 1.11.0 Apr 2, 2024
@Splines Splines changed the title Continous Release 1.11.0 Continuous Release 1.11.0 Apr 2, 2024
@Splines Splines merged commit c81dc10 into main Apr 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants