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

feat!: use explicit stats' query params #59

Closed
wants to merge 1 commit into from

Conversation

andrey-canon
Copy link
Collaborator

Description

This implements explicit stats' query params since the current options are ambiguous

Testing instructions

  1. check this branch
  2. test new queryparams, example /eox-nelp/frontend/stats/tenant/?hideVideos=true&hideCourses&hideLearners=false

Result

image

var showProblems = "true" === "${problems}";
var showLearners = "true" === "${learners}";
var showInstructors = "true" === "${instructors}";
var showVideos = "false" === "${hideVideos}";
Copy link
Collaborator

@johanseto johanseto Jul 5, 2023

Choose a reason for hiding this comment

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

I like the refactoring of the query parameters in the theme. The only thing is the logic, so In control, we have to thing in hidden items. So I have to use a blacklist logic.
Mainly, I am looking at this view as the feedback API endpoint for example. We have a boolean parameter public.
If we set it true it means public but if I set it false not public or "private, hide-public". The thing is that we want to manage this logic of blacklist?
Also, I have a mismatch of the query param, this is a django view, query params in snake case... but ups the react component use Camelcase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

please stop using racist terms, but anyway that is just a semantic thing if the label say hide or show the user should be smart enough to select the right option

var showVideos = "false" === "${hideVideos}";
var showCourses = "false" === "${hideCourses}";
var showProblems = "false" === "${hideProblems}";
var showLearners = "false" === "${hideLearners}";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here is that thing where we have to consider changing the names and matching connection with component, why if the component has ShowCourses we have to connect it with hideCourses? This could be confusing.
😶‍🌫️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this comment is weird since you removed the thing that you are proposing

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, I changed it to true in my first approach. Then due to my confusion about snake_case and camel_case, I changed to videos, courses, problems.learners.. they all fit snake and camel case

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, I checked again your changes and you didn't proposed any change in the way how the api is consumed, you only changed the default values to show everything but using confusing names

@andrey-canon
Copy link
Collaborator Author

closed in favor of #60

@andrey-canon andrey-canon deleted the and/use_explicit_params branch July 6, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants