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

Refactor block retrieval #1241

Merged
merged 15 commits into from
Sep 4, 2024
Merged

Refactor block retrieval #1241

merged 15 commits into from
Sep 4, 2024

Conversation

BeritJanssen
Copy link
Collaborator

This PR implements the last steps to close #973.

Copy link

sentry-io bot commented Aug 27, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: backend/experiment/views.py

Function Unhandled Issue
get_block ValueError: Rules do not exist (anymore): VISUAL_MATCHING_PAIRS for block VMP (vmp) ...
Event Count: 1
get_block AttributeError: 'NoneType' object has no attribute 'section_set' /server/experime...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

Copy link
Contributor

@drikusroor drikusroor left a comment

Choose a reason for hiding this comment

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

I made some minor comments, but I found it hard to review this PR as I don't really understand what its intention is

Comment on lines +11 to +14
theme?: Theme;
class_name: string;
rounds: number;
playlists: Playlist[];
Copy link
Contributor

Choose a reason for hiding this comment

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

These properties already exist on ExtendedBlock so you can maybe remove them there (or here)

frontend/src/components/Experiment/Experiment.tsx Outdated Show resolved Hide resolved
@BeritJanssen BeritJanssen self-assigned this Sep 2, 2024
@BeritJanssen
Copy link
Collaborator Author

To clarify: the intention is that the get request to block doesn't return the next_round array anymore, but only information on theme etc., and most importantly, the session id. That id is then used to make a session/{id}/next_round request. I've always found the construct of having the request to block already contain actions defined in the rules files confusing and awkward to work with. That also does away with the necessity of having a distinction between Block / ExtendedBlock, as far as I could see.

@BeritJanssen
Copy link
Collaborator Author

Ah yes, but now I read back the changes I realize I also mixed in commits to remove the Consent option from the potential block actions.

@BeritJanssen BeritJanssen merged commit 1c7743a into develop Sep 4, 2024
15 checks passed
@BeritJanssen BeritJanssen deleted the refactor/block-getter branch September 4, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove first_round from rules files
2 participants