-
Notifications
You must be signed in to change notification settings - Fork 15
Refactor/faculty #419
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
Open
Debatreya
wants to merge
34
commits into
staged
Choose a base branch
from
refactor/faculty
base: staged
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor/faculty #419
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rocessing function
This pull request improves the reliability and safety of tag-based filtering in the `FacultySectionComponent` by ensuring tag identifiers are safe for use in HTML element IDs and CSS selectors. The changes primarily address potential issues with tags containing spaces, which could break selector logic or cause invalid IDs. **Tag Filtering and ID Safety Improvements:** * Tag filter input IDs and corresponding CSS selectors now use a sanitized version of the tag (`safeTagId`) that replaces spaces with hyphens, preventing invalid HTML IDs and broken CSS selectors. ([app/[locale]/faculty-and-staff/utils.tsxL480-R523](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL480-R523)) * The mapping logic for rendering radio buttons and their labels for tag filters is updated to consistently use `safeTagId` for both the `id` and `htmlFor` attributes, further ensuring correct association and accessibility. ([app/[locale]/faculty-and-staff/utils.tsxL480-R523](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL480-R523)) * CSS rules for showing filtered faculty/staff items are updated to use the sanitized tag IDs, ensuring that filtering works correctly even for tags with spaces. ([app/[locale]/faculty-and-staff/utils.tsxL480-R523](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL480-R523)) --------- Co-authored-by: Navneet Kaur <[email protected]> Co-authored-by: Copilot <[email protected]>
This pull request adds support for distinguishing between "award" and "recognition" in faculty profiles, including updates to translations, schema validation, and the database schema. The main changes are grouped below: **Internationalization updates:** * Added "award" and "recognition" fields to the English (`i18n/en.ts`) and Hindi (`i18n/hi.ts`) translation files. [[1]](diffhunk://#diff-8ee4c65eaaf735c33bd37bf76d2a87fb76d02b7928096cc26db6364694988ceeR339-R340) [[2]](diffhunk://#diff-912c4f60653cc2c8d00fda0b21a7a65ab1c3e1c3f65007e1f211f40c951596b8R348-R349) * Updated the `Translations` interface to include `award` and `recognition` fields. **Schema and database updates:** * Updated the faculty profile schema to require a `tag` field, which must be either "award" or "recognition". * Modified the `awardsAndRecognitions` database table to include a `tag` column with allowed values "award" or "recognition". --------- Co-authored-by: Debatreya Das <[email protected]>
This pull request adds support for categorizing awards, recognitions, and intellectual property rights (IPR) with specific tags across the application. The changes include updating the translation files, schema validation, and database schema to handle new tag fields for awards/recognitions and IPR entries. **Schema and Database Updates:** * Added a `tag` field to the IPR schema and database table, allowing values: `'patent'`, `'copyright'`, `'trademark'`, and `'design'`. [[1]](diffhunk://#diff-5c6cb934d7b7beea1934ca56e01e8750ad5068e02fb7fb9d49553169433b4df3L61-R61) [[2]](diffhunk://#diff-8bcc32dd561b4fe62d5c0f87de70181d1d472510a7d4a937e24ee17dbbec9f9dL59-R63) * Added a `tag` field to the Awards and Recognitions schema and database table, allowing values: `'award'` and `'recognition'`. [[1]](diffhunk://#diff-5c6cb934d7b7beea1934ca56e01e8750ad5068e02fb7fb9d49553169433b4df3R97) [[2]](diffhunk://#diff-8bcc32dd561b4fe62d5c0f87de70181d1d472510a7d4a937e24ee17dbbec9f9dR186-R190) **Internationalization (i18n) Updates:** * Updated English (`i18n/en.ts`) and Hindi (`i18n/hi.ts`) translation files to include new tag labels for awards, recognitions, patents, designs, copyrights, and trademarks. [[1]](diffhunk://#diff-8ee4c65eaaf735c33bd37bf76d2a87fb76d02b7928096cc26db6364694988ceeR339-R344) [[2]](diffhunk://#diff-912c4f60653cc2c8d00fda0b21a7a65ab1c3e1c3f65007e1f211f40c951596b8R348-R353) * Updated the `Translations` interface to support the new tag fields.
This pull request adds support for categorizing research projects as either "project" or "consultancy" throughout the application. It introduces new translation strings for these categories in both English and Hindi, updates the schema validation, and modifies the database schema to include a `tag` field for research projects. **Internationalization updates:** * Added `project` and `consultancy` translation strings to the English (`i18n/en.ts`) and Hindi (`i18n/hi.ts`) translation files. [[1]](diffhunk://#diff-8ee4c65eaaf735c33bd37bf76d2a87fb76d02b7928096cc26db6364694988ceeL344-R346) [[2]](diffhunk://#diff-912c4f60653cc2c8d00fda0b21a7a65ab1c3e1c3f65007e1f211f40c951596b8L353-R355) * Updated the `Translations` interface to include `project` and `consultancy` fields. **Schema and database changes:** * Updated the `facultyProfileSchemas` validation to require a `tag` field for research projects, restricted to "project" or "consultancy". * Modified the `research_projects` database schema to add a required `tag` column, with allowed values "project" or "consultancy".
This pull request introduces a minor update to the `FacultySectionComponent` in `app/[locale]/faculty-and-staff/utils.tsx`. The change primarily adds a conditional block to render UI elements only when an `id` is present, improving the clarity and correctness of the component's rendering logic. UI rendering improvements: * Added a conditional wrapper so that the `<span>` containing the button is only rendered when `id` is present, ensuring UI elements are shown appropriately. ([app/[locale]/faculty-and-staff/utils.tsxR540-R541](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR540-R541), [app/[locale]/faculty-and-staff/utils.tsxR552](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR552))
This pull request refactors the layout and rendering of faculty section items in the `FacultySectionComponent` to improve clarity, consistency, and maintainability. The most significant changes include restructuring how the tag badge and edit button are displayed, updating CSS for better alignment, and cleaning up duplicated logic. **Layout and UI improvements:** * The title row now uses a `div` with improved flex layout, placing the tag badge and edit button together for better alignment and clarity. ([app/[locale]/faculty-and-staff/utils.tsxL570-R572](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL570-R572), [app/[locale]/faculty-and-staff/utils.tsxL580-L584](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL580-L584), [app/[locale]/faculty-and-staff/utils.tsxL600-R617](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL600-R617)) * The tag badge is now rendered as an `inline-block` instead of `inline`, ensuring proper spacing and alignment in the UI. ([app/[locale]/faculty-and-staff/utils.tsxL497-R497](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dL497-R497)) **Code cleanup and logic simplification:** * Tag badge rendering logic has been consolidated into the title row, removing duplicate rendering from the date row and streamlining the component structure. ([app/[locale]/faculty-and-staff/utils.tsxR636-L635](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR636-L635)) **Minor enhancements:** * Additional whitespace and improved grouping of details, people/location/role, and date/status information for better readability. ([app/[locale]/faculty-and-staff/utils.tsxR627](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR627), [app/[locale]/faculty-and-staff/utils.tsxR636-L635](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR636-L635)) #339
#351) This pull request introduces a custom ordering for publication tags in the faculty and staff section and adds translation support for the "book chapter" tag in both English and Hindi. The main changes are as follows: **Faculty and Staff Section Improvements:** * Added a custom sort order for publication tags so that tags like `journal`, `conference`, `book`, `book-chapter`, `project`, and `consultancy` appear first, with any other tags sorted alphabetically at the end. (`app/[locale]/faculty-and-staff/utils.tsx`) ([app/[locale]/faculty-and-staff/utils.tsxR469-R481](diffhunk://#diff-3e362b10e143377150343a08121115b31eeefe1081b2d3cdc3bb5551eaec6b4dR469-R481)) **Internationalization Updates:** * Added the "book chapter" label to the English translations under publication types. (`i18n/en.ts`) * Added the "book chapter" label to the Hindi translations under publication types. (`i18n/hi.ts`) * Updated the `Translations` interface to include the "book chapter" key under publication types. (`i18n/translations.ts`)…ion also capitalized book chapter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A constant Faculty updates to Staged