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

Add Job Viewer visual element to display job details #2051

Conversation

Nupoor10
Copy link

This PR is regarding issue #412

It includes addition of a new job viewer visual element that is similar to the details panel of the Job Selector visual element

  1. Added a new React component JobDetailsViewer
  2. Displayed all necessary information outlined in the issue with the correct conditions
  3. Added a new method to fetch complete job details
  4. Added a new method to check if a job can be cancelled
  5. Modified the _GuiCoreLib.py and viselements.json files appropriately

@Nupoor10
Copy link
Author

@quest-bot loot #412

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 14, 2024
Copy link

quest-bot bot commented Oct 14, 2024

Quest PR submitted! image Quest PR submitted!

@Nupoor10, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

@Nupoor10
Copy link
Author

I had a few questions regarding this PR.

  1. In which subfolder should I add the test file for the JobDetailsViewer component?
  2. I tried to implement this component but I get a job_viewer not registered message so how can I implement it?
  3. I have implemented the is_cancellable method in job.py folder that returns a boolean value, is that the expected implementation or should it return a ReasonCollection?
  4. In the _GuiCoreLib.py file I Have used the __JOB_SELECTOR_ERROR_VAR variable so is it correct?

Additionally if there are any changes do let me know.

Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

re-use :-)

Copy link
Member

Choose a reason for hiding this comment

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

Can you not reuse the JobViewer component ?

@FredLL-Avaiga
Copy link
Member

FredLL-Avaiga commented Oct 18, 2024

  1. In which subfolder should I add the test file for the JobDetailsViewer component?

in the same folder, the file name should end with spec.tsx (check ScenarioSelector.spec.tsx)

  1. I tried to implement this component but I get a job_viewer not registered message so how can I implement it?

frontend component name is calculated from backend name if not provided
you need to add the react_component parameter to your Element instantiation

  1. I have implemented the is_cancellable method in job.py folder that returns a boolean value, is that the expected
    implementation or should it return a ReasonCollection?

a ReasonCollection would be nicer and more consistent

  1. In the _GuiCoreLib.py file I Have used the __JOB_SELECTOR_ERROR_VAR variable so is it correct?

No, you need to define a specific error variable name for this new component

PS: please fix the linter errors and update your branch

@FredLL-Avaiga
Copy link
Member

Are you still working on this PR @Nupoor10 ?

@FredLL-Avaiga
Copy link
Member

Are you still working on this PR @Nupoor10 ?

If you're not, please close this PR

@Nupoor10 Nupoor10 closed this Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants