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

Initial session update with "rough" sorting #1052

Merged
merged 5 commits into from
Oct 24, 2022

Conversation

BradleySappington
Copy link
Collaborator

making the list used in previous/next buttons reflect the order of the thumbnails shown on the proposal page

@BradleySappington BradleySappington self-assigned this Oct 5, 2022
@BradleySappington BradleySappington linked an issue Oct 5, 2022 that may be closed by this pull request
Copy link
Collaborator

@mfixstsci mfixstsci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @BradleySappington the code looks good, have a couple of questions! I need to test the changes on the server as well.

}
$.ajax({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BradleySappington this is clever. Have you seen what happens where the is a failure? Is anything reported to the page for the user to see?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will report it only in the console, so if you have the console up on your terminal you will see it. I didn't think a session not-updating is something that the user should be aware of.

@@ -342,7 +340,7 @@ def archive_thumbnails_ajax(request, inst, proposal, observation=None):
inst = JWST_INSTRUMENT_NAMES_MIXEDCASE[inst.lower()]

data = thumbnails_ajax(inst, proposal, obs_num=observation)

data['thumbnail_sort'] = request.session.get("image_sort", "Ascending")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BradleySappington is this an example of storing session data like we discussed in the past? Also, does this set the default for the thumbails to be in Ascending order?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and Yes

@mfixstsci mfixstsci merged commit 1307e76 into spacetelescope:develop Oct 24, 2022
@BradleySappington BradleySappington deleted the order_prev_next branch March 30, 2023 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Web Application WIP Work in Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort Thumbnails and Proposals for Next & Previous Buttons
2 participants