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

Prepare for 2023-admission #1206

Merged
merged 2 commits into from Aug 22, 2023
Merged

Prepare for 2023-admission #1206

merged 2 commits into from Aug 22, 2023

Conversation

norbye
Copy link
Member

@norbye norbye commented Aug 22, 2023

Changes

  • Update text to match HS' wishes (specify usage of application texts and remove priority-field).
  • Re-activeted application draft to make sure that it works (at least it now works on my end to reload the page and it stays the same)
  • Fixed bug where you had to submit multiple times
  • Set react-query to refetch as little as possible (the admission shouldn't update while it's being edited so there should be no need)

Currently I have made no changes to the admin-views or the backend - as the priority-text was never mandatory. Thus it now works as if all applicants left them blank, and the admins will see it as an empty box. If anyone wants to remove it from the admin-view as well that should be a quick fix.

Visual changes;

Before After
image image

Resolves ABA-464, ABA-463

@norbye norbye requested a review from a team August 22, 2023 07:48
@linear
Copy link

linear bot commented Aug 22, 2023

ABA-464 Remove prioritization text

HS has decided that we should no longer ask applicants to include a prioritization text, thus it should be removed (or hidden) from the website.

Here is the background for the decision:

Slik det er i dag har de som søker komité i Abakus mulighet til å prioritere hvilke komitéer de har mest lyst å være med i. Dette gir kandidatene et inntrykk av at deres prioritering har en påvirkning på hvilken komité de kommer med i, men realiteten er at denne prioriteringen brukes i aller minste grad. Det varierer også basert på hvem som er leder/nestleder for Abakus under opptaket. Det er altså ingen klare retningslinjer på hvordan man skal håndtere kandidaters egen prioritering. Prosjektet anbefaler derfor at prioritering fjernes. Hovedstyret velger derfor å inkludere et krav til at prioritering fjernes fra og med opptak 2023.

ABA-463 Add information about usage of application-text

It should follow the following guidelines descided by HS:

Hovedstyret velger basert på rapporten at man skal informere om at søknaden brukes i intervjuprosessen, men at man får intervju uansett. Da er motivasjonen større til å skrive en god søknad og til å bruke den underveis. Det anbefales også å spesifisere tydeligere hva kandidatene skal skrive. Det kan blant Ledelsen avgjøre om dette skal være generalisert for alle komitéene, eller spesifikt for hver komité.

Comment on lines -6 to -19
useEffect(() => {
initializeValue();
}, []);

const initializeValue = () => {
const groupName = props.group.name.toLowerCase();

const restoredApplicationText = getApplictionTextDrafts();

if (restoredApplicationText != null && restoredApplicationText[groupName]) {
props.form.setFieldValue(groupName, restoredApplicationText[groupName]);
}
};

Copy link
Member Author

Choose a reason for hiding this comment

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

This code has the same functionality as what I modified in Applicationform/index.tsx line 111. No need to do it twice.

Comment on lines +74 to +80
useEffect(() => {
// Only run on first load after myApplication is set
if (isEditingApplication === null && myApplication !== undefined) {
// Set to is not editing if myApplication exists (user has submitted an application)
setIsEditingApplication(!myApplication);
}
}, [isEditingApplication, myApplication]);
Copy link
Member Author

Choose a reason for hiding this comment

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

This logic sets what isEditingApplication should be on page load (the variable that decides if you see the page where you edit your application OR the receipt page you get after submitting the application).
The way I set it to now, it will always show the receipt page if you have previously submitted an application.

A more ideal behavior might be to save a timestamp to the application draft (in session storage) and compare that to the timestamp of the submitted application

Copy link

Choose a reason for hiding this comment

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

how did this work before?

Copy link
Member Author

@norbye norbye Aug 22, 2023

Choose a reason for hiding this comment

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

Previously it worked the same way as it does now, although with a little bug where you had to press the submit-button twice when you were making an application (because the initial value was still null, and not true or false -> implying that when you pressed the button it changed from null to true, then from true to false the second time - and you only see the receipt page when it is not true).
So the option to change stuff is more of a future improvement so to say

@norbye norbye added review-needed Pull requests that need review frontend bug-fix Pull requests that fix a bug labels Aug 22, 2023
Copy link
Contributor

@PeterJFB PeterJFB left a comment

Choose a reason for hiding this comment

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

Only have 1 question ^^^, everything else looks 💯

frontend/src/routes/ApplicationForm/FormStructureStyle.tsx Outdated Show resolved Hide resolved
Comment on lines +74 to +80
useEffect(() => {
// Only run on first load after myApplication is set
if (isEditingApplication === null && myApplication !== undefined) {
// Set to is not editing if myApplication exists (user has submitted an application)
setIsEditingApplication(!myApplication);
}
}, [isEditingApplication, myApplication]);
Copy link

Choose a reason for hiding this comment

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

how did this work before?

Make overlay stick over icons
Translate ActionButton to Norwegian
Remove unnecessary use of draft in GroupApplication component
@norbye norbye added approved Pull requests that have been approved and removed review-needed Pull requests that need review labels Aug 22, 2023
@norbye norbye enabled auto-merge August 22, 2023 20:33
@norbye norbye merged commit a07be10 into master Aug 22, 2023
2 of 3 checks passed
@norbye norbye deleted the pre-admissions-fixup branch August 22, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved bug-fix Pull requests that fix a bug frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants