-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FAU-420] Add new "German language skills for international students" filter and allow sorting by it #29
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise LGTM. Please fix the stylelint issues before merging this and also update the common package once it's merged so that Psalm is happy as well :) Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good and functions well too! As Orestis mentioned, it would be good if the linter's issues were addressed. Thank you for your work on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we need to update the actual meta key here -
FAU-Studium-Embed/src/Infrastructure/Search/FilterablePostsMetaUpdater.php
Lines 72 to 114 in 5bbcc52
/** | |
* @psalm-param LanguageCodes $languageCode | |
*/ | |
private function updateForLanguage(string $languageCode, DegreeProgramViewRaw $rawView): void | |
{ | |
update_post_meta( | |
$rawView->id()->asInt(), | |
DegreeProgram::DEGREE . '_' . $languageCode, | |
$rawView->degree()->name()->asString($languageCode) | |
); | |
if ($rawView->start()->offsetExists(0)) { | |
update_post_meta( | |
$rawView->id()->asInt(), | |
DegreeProgram::START . '_' . $languageCode, | |
$rawView->start()->offsetGet(0)->asString($languageCode), | |
); | |
} | |
if ($rawView->location()->offsetExists(0)) { | |
update_post_meta( | |
$rawView->id()->asInt(), | |
DegreeProgram::LOCATION . '_' . $languageCode, | |
$rawView->location()->offsetGet(0)->asString($languageCode) | |
); | |
} | |
$admissionRequirement = AdmissionRequirementsTranslated::fromAdmissionRequirements( | |
$rawView->admissionRequirements(), | |
$languageCode, | |
) | |
->mainLink(); | |
if (!$admissionRequirement instanceof AdmissionRequirementTranslated) { | |
return; | |
} | |
update_post_meta( | |
$rawView->id()->asInt(), | |
DegreeProgram::ADMISSION_REQUIREMENTS . '_' . $languageCode, | |
$admissionRequirement->name() | |
); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch 👌
It's definitely needed for consuming sites
Thanks done, there were some un-related issues, I added those to the baseline file so we can revisit them later. |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
https://inpsyde.atlassian.net/browse/FAU-420
No filter for required German language skills for degree programs
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No
Other information:
Related PR: RRZE-Webteam/FAU-Studium-Common#5
Screenshots of new filter / sorting column, Maybe we can discuss changing the layout slightly so it looks better.