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

Allow for optional platform names in header #58

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

jazairi
Copy link
Contributor

@jazairi jazairi commented Feb 7, 2024

Why these changes are being introduced:

Matt added the platform name to Omeka to remind users where in the MITL ecosystem they are. We were planning to add this to Geodata when we realized that it would probably be useful in other Rails apps, and should thus go in the theme gem.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/GDT-124

How this addresses that need:

This adds an optional platform name in the header, based on the PLATFORM_NAME environment variable. Environments that don't set PLATFORM_NAME will continue to have the standard header.

Side effects of this change:

The SCSS updates for this should likely be moved upstream to the style guide, but I couldn't decide if that should happen before or after this merges.

Developer

  • All new ENV is documented in README (Note: This will need to be done for each individual Rails app. I will open PRs to that effect one this merges.)
  • All new ENV has been added to Heroku Pipeline, Staging and Prod (Note: This will need to happen in each Heroku environment where we want this change applied.)
  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • There are appropriate tests covering any new functionality
  • The documentation has been updated or is unnecessary
  • The changes have been verified
  • New dependencies are appropriate or there were no changes

Requires database migrations?

NO

Includes new or updated dependencies?

NO

Copy link

github-actions bot commented Feb 7, 2024

Pull Request Test Coverage Report for Build 7821033145

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.372%

Totals Coverage Status
Change from base Build 7253370882: 0.0%
Covered Lines: 38
Relevant Lines: 43

💛 - Coveralls

@jazairi
Copy link
Contributor Author

jazairi commented Feb 7, 2024

FYI, to the reviewer: the easiest way to test this is to pull this branch to your local theme gem repo, point your Gemfile to that path and branch in the local git repo of a Rails app of your choice, then add PLATFORM_NAME to the env of that Rails app.

@matt-bernhardt matt-bernhardt self-assigned this Feb 8, 2024
Copy link
Member

@matt-bernhardt matt-bernhardt left a comment

Choose a reason for hiding this comment

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

For the use case this is envisioning, this looks like it should work fine, so I think this is fine to merge as is:

Screenshot 2024-02-08 at 11 38 52 AM

However, I think we're going to need to consider the mobile / small screen behavior of this feature in order to extend it to systems like ETD, or any tool that is going to need more than a few letters.

Screenshot 2024-02-08 at 11 37 42 AM

That can probably be something that happens at the style library level, though. We'd need to update this gem again when that happens anyway, so removing the styles added here in favor of those we'll inherit shouldn't be something we forget to do.

If that makes sense to you, then I'm happy to :shipit: now.

@matt-bernhardt
Copy link
Member

OH - one other thing. I wanted to ask about whether the new environment variable needed to be documented anywhere?

@jazairi
Copy link
Contributor Author

jazairi commented Feb 8, 2024

@matt-bernhardt Oh yeah, good point about mobile viewports. I think I'll add some preliminary SCSS here, so when we do move this upstream, there will be something to work with. Thanks!

As for documentation, I plan to add this as an optional variable to each Rails repo's readme. That's how we've documented GLOBAL_ALERT, which I think is the only other theme feature that can be toggled with env like this.

Copy link
Member

@matt-bernhardt matt-bernhardt left a comment

Choose a reason for hiding this comment

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

Yep, that looks good - thanks for laying this foundation for when this moves up to the style library!

:shipit:

Why these changes are being introduced:

Matt added the platform name to Omeka to remind users where in
the MITL ecosystem they are. We were planning to add this to
Geodata when we realized that it would probably be useful in other
Rails apps, and should thus go in the theme gem.

Relevant ticket(s):

https://mitlibraries.atlassian.net/browse/GDT-124

How this addresses that need:

This adds an optional platform name in the header, based on the
`PLATFORM_NAME` environment variable. Environments that don't set
`PLATFORM_NAME` will continue to have the standard header.

Side effects of this change:

The SCSS updates for this should likely be moved upstream to the
style guide, but I couldn't decide if that should happen before or
after this merges.
@jazairi jazairi force-pushed the gdt-124-platform-name-in-header branch from d162398 to 54b822e Compare February 9, 2024 14:09
@jazairi jazairi merged commit bcbe5d3 into main Feb 9, 2024
2 checks passed
@jazairi jazairi deleted the gdt-124-platform-name-in-header branch February 9, 2024 14:14
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.

2 participants