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

Lf 4375 spotlight animals add animals beta spotlight #3544

Merged

Conversation

Duncan-Brain
Copy link
Collaborator

@Duncan-Brain Duncan-Brain commented Nov 22, 2024

Description

Adds animals beta spotlight

Notes:

  • I filled in missing for only some strings as I learned other aren't adding MISSING anymore!
  • I don't love prop drilling the open Feedback Survey state -- if we get more of these it might be worth making a provider.
  • 600px issue (see video) really stumps me
    • there is some interplay with the animation of the side menu (commenting out the keyframes prevents this) -- in most circumstances the side menu animation has been run before getting to the animals screen (eg on home page). One can track the animationend event but its messy for not much value.
Screen.Recording.2024-11-22.at.11.36.20.AM.mov

Jira link:LF-4375

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have added "MISSING" for all new language tags to languages I don't speak
  • I have added the GNU General Public License to all new files

@Duncan-Brain Duncan-Brain marked this pull request as ready for review November 23, 2024 00:25
@Duncan-Brain Duncan-Brain requested review from a team as code owners November 23, 2024 00:25
@Duncan-Brain Duncan-Brain requested review from antsgar and kathyavini and removed request for a team November 23, 2024 00:25
Copy link
Collaborator

@antsgar antsgar left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉 left one minor comment but not a blocker.

My only thought is that the location for this spotlight means that the user won't see it unless they navigate to the Animals section, and by that point they have already noticed it so there's less impact to having a spotlight. It seems to me it'd be more useful to have it on the "Animals" text in the menu?

import { ReactComponent as SendIcon } from '../../../assets/images/send-icon.svg';
import styles from './styles.module.scss';

export default function AnimalsBetaSpotlight({ children, setFeedbackSurveyOpen }) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we'll likely be needing similar "beta" spotlights for upcoming features, I could see value in having a BetaSpotlight reusable component with only the more specific parameters as props, and then having that component be a child of this one. Not a blocker for merge though, can be done when we have an upcoming beta feature!

@kathyavini
Copy link
Collaborator

kathyavini commented Nov 25, 2024

@antsgar did you have any thoughts on the failure at 599-600px Duncan mentioned because it has me totally stumped! Or is it safe to say we don't care if one particular screen width is non-functional?

Edit: actually it might be even more niche than that. It was definitely reproducible for me but only with window resize, which seems like nothing we have to worry about.

Screenshot 2024-11-25 at 1 02 37 PM

Screenshot 2024-11-25 at 12 50 01 PM

Copy link
Collaborator

@kathyavini kathyavini left a comment

Choose a reason for hiding this comment

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

I also had the same initial thought as Anto regarding the spotlight requiring Animal Inventory to be clicked (it's almost too late at that point to be spotlighting) but I guess if it targets the menu, there wouldn't be anything to highlight in mobile view? Well, I guess until the menu is opened for the first time? 🤔

@Duncan-Brain I like your idea about a provider for those props! For the next iteration / beta feature!

@kathyavini kathyavini added this pull request to the merge queue Nov 26, 2024
Merged via the queue into integration with commit 34490d0 Nov 26, 2024
5 checks passed
@@ -2066,7 +2068,7 @@
"BADGE": {
"BETA": {
"TITLE": "Beta",
"CONTENT": "Get a sneak peek at our new animal management feature—now in beta! Your feedback is crucial as we refine this feature. Please share any bugs or suggestions you encounter. We appreciate your help in improving liteFarm! You can learn more about beta <a>here</a>"
"ANIMALS_CONTENT": "Get a sneak peek at our new animal management feature—now in beta! Your feedback is crucial as we refine this feature. Please share any bugs or suggestions you encounter. We appreciate your help in improving liteFarm! You can learn more about beta <a>here</a>"
Copy link
Collaborator

@kathyavini kathyavini Nov 26, 2024

Choose a reason for hiding this comment

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

Okay, it's a little too late but I think we'll want to avoid this in the future -- renaming strings that right now are only in CrowdIn -- because CrowdIn UX is not good for it.

I think the original translation was preserved (only and a bit cryptically) in the TM & ML suggestion, but its lost the authorship metadata and there appears to be no way to search for it 🫤

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeahhh, I knew it as I was doing it but figured we will need to be able to change key names. This one is particularly long I should have checked first. But was maybe hoping they hadn't got to it in the couple days badge was in for.

@Duncan-Brain
Copy link
Collaborator Author

@antsgar @kathyavini

In the designs it seems to be shown on inventory, I think one of the nice thing about the placement is that it isn't obtrusive unless you navigate to animals. Until then it is a curiosity you can find out about when you click the menu.

For the 600px thing -- yeah I tried to describe its a very weird thing that only happens essentially when you navigate directly to the inventory screen bypassing the menu animation on all other screens. If you see the menu animation anywhere else, it shouldn't happen.

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.

3 participants