Teammates: Instructor: view feedback: correct behavior of toggle buttons

Created on 14 Sep 2015  路  4Comments  路  Source: TEAMMATES/teammates

Steps:

  1. Login as an instructor
  2. Load results of a session. Load a specific section. Choose the 'view' shown in the screenshot.
    image

Problem:

  1. The toggle button says 'expand sections' but the section is already expanded by default
  2. The button for 'collapse teams' is not appearing at all. It only appears after clicking the 'expand/collapse sections' button a few times (see below)
    image
a-UIX help wanted p.Medium

All 4 comments

Hi @damithc. Some comments after investigating this issue.

  1. The toggle button says 'expand sections' but the section is already expanded by default

This no longer seems to be an issue as all the sections load collapsed now.

  1. The button for 'collapse teams' is not appearing at all. It only appears after clicking the 'expand/collapse sections' button a few times (see below)

Am currently investigating this. (I replicated it once while randomly hitting buttons but can't seem to do it again. These buttons, in general, appear to behave very erratically). Let me know if you find a sure shot way of replicating.

I have however found another issues with these buttons. In the GRQ view, even if you manually expand all the teams, the expand button still reads Expand Teams and does nothing on click.

These buttons, in general, appear to behave very erratically

Yup. if the bug cannot be reproduced reliably, we can review/refactor all the code related to those buttons and also add test cases to cover all behavior scenarios we can think of. Sometimes hidden flaws in the code surface only when we clean up the code.

@damithc

Just realised that I missed a step from your original issue description.

Load results of a session. Load a specific section. Choose the 'view' shown in the screenshot.

I forgot to Load a specific section. On doing so, I noticed that both your issues are indeed still reliably replicable.

Furthermore, some additional investigation leads me to believe that the buttons behave erratically only because the expand all sections and collapse all sections buttons don't change the text of the inner buttons. For instance, consider the following:

  1. Load FS results page in any view EXCEPT Group By - Question (and any section)
  2. Click Expand all sections
  3. Click Collapse Teams in panel header of any one section. (The text for this button now changes to Expand Teams)
  4. Click Collapse all Sections
  5. Click Expand all Sections again
  6. The button in the panel header will read Expand Teams (as explained in point 3) and takes no action on clicking.

This can be fixed if clicking the Collapse All Sections or Expand All Sections also results in the necessary changes to the inner button labels. Any other method you might suggest?

Working on this.

This can be fixed if clicking the Collapse All Sections or Expand All Sections also results in the necessary changes to the inner button labels. Any other method you might suggest?

While you wait for better suggestions from the other devs (if any), you can go ahead with this approach and see how it pans out.

Was this page helpful?
0 / 5 - 0 ratings