Skip to content

Conversation

@Debatreya
Copy link
Member

A constant Faculty updates to Staged

Debatreya and others added 30 commits August 13, 2025 18:05
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".
…ation only when 'all' is selected as filter (#344)

add spacing b/w publications title and tags , display tags in
publication only when 'all' is selected as filter
 #339
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants