Commit Graph

34 Commits

Author SHA1 Message Date
Angie
ce7e91e209 fix side by side button text is cut off in different languages and large font sizes (#2571)
* fixes issues where side by side button text is cut off in different languages and large font sizes.
Refactor to use ButtonBar in all places with side by side buttons. Truncates header in ObsEdit when language text exeeds space to not push kebab menu off screen. Closes #2500.

* update snapshots

* clean up BottomButtons.tsx
2024-12-18 10:56:00 -08:00
budowski
2162f55ac3 Fix #2323 - view taxon observations from explore screen by tapping on taxon (#2554)
* Fix #2323 - view taxon observations from explore screen by tapping on taxon

* Updated test snapshots
2024-12-17 16:30:11 -08:00
Angie
04271bef07 Prevent activityheader text and withdraw button from being cut off in smaller screens (#2431)
Also includes adjustments to explore at large font sizes. Closes #2315.
2024-11-15 10:09:37 -08:00
Ken-ichi
3dcc833c98 feat: support basic layout, typography, and photo carousel in RTL (#2334)
* Use a wrapper around Text for all typography components that sets
  app-specific defaults, allowing default RTL to work
* feat: make iOS permission prompt text translatable
* fix: allow RTL layout of char limit on text input bottom sheet
* fix: allow RTL photo carousel on ObsDetails and TaxonDetails

Removes react-native-reanimated-carousel, which needs to be patched to support
RTL and maybe wasn't providing anything beyond FlatList for us anyway.

InfoPlist.xcstrings will not be automatically updated on Crowdin sync pending
a Crowdin bug.

Work toward #2099
2024-11-01 12:59:25 -07:00
Angie
49bfb78d1b limit button width to 500px (#2335)
* Limit button width to 500px.
Closes #2170.

* Update snapshots
2024-10-31 18:16:38 -07:00
Amanda Bullington
9cba689a4a Audit and simplify text colors (#2229)
* Change black text to dark gray text

* Start simplifying to a single color scheme

* Remove custom paper theme colors

* More theme cleanup

* Styling specifically for RNPaper components

* Update snapshots to use hex colors, not rbga
2024-10-04 13:37:48 -07:00
Ken-ichi
b81346f623 fix: control max text scaling to allow nav w/ large font sizes (#2129) 2024-09-20 10:42:22 -07:00
budowski
b96051cb02 Internal feedback form (#1992)
Adds internal feedback form that posts to our logging infrastructure.

Also,

* Adds maxLength prop to TextInputSheet w/ UI to show characters remaining
* Adds optional description to TextInputSheet
* Adjusts TextInputSheet input height to fit area left by the keyboard

Closes #1844 

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2024-08-22 15:12:37 -07:00
Ken-ichi
6d553daa0b Made status text in Toolbar clickable to start upload (#1678)
Also refactored layout code to be a bit more rational and added Toolbar to the
UI library to help visualize its many states.

Closes #1453
2024-06-13 18:36:24 -07:00
Amanda Bullington
e19221ddf0 Reduce app size (fonts and model/taxonomy assets) (#1513)
* Remove material community icons

* Remove unneeded font files from app

* Show app size in Debug on Android

* Update snapshots

* Code cleanup
2024-05-08 09:22:01 -07:00
Amanda Bullington
21b9cc6a97 Update Eslint to support TypeScript (#1419)
* Add typescript parser and fix Flow errors in JS files

* Uninstall packages from react-native/eslint-config

* Fix all flow errors (or ignore them for unknowns
2024-04-18 21:35:26 -07:00
Amanda Bullington
73b8f6e5ee Update Typography with latest text styles (#1410)
* Replace Whitney fonts with Lato

* Escape font family names so Lato works on iOS

* Update custom fonts

* Typography file cleanup

* Rename constants to appConstants

* Fix margins in AddObsModal

* Update Typography styles in tailwind config; closes #1398

* Styling fixes for typography

* Update snapshots

* Fix snapshots

* Fix photo count typography

* Code cleanup

* Update Heading2 snapshot
2024-04-17 15:52:13 -07:00
Amanda Bullington
2f94987b4c Whitney -> Lato font (#1407)
* Replace Whitney fonts with Lato

* Escape font family names so Lato works on iOS

* Update custom fonts

* Typography file cleanup

* Rename constants to appConstants

* Fix margins in AddObsModal
2024-04-17 11:30:55 -07:00
Ken-ichi
2af42cfb3a Several changes to recent font updates (#1296)
* Restore Whitney Book as default font so <Text> isn't bold by default
* Refactor a function that fetches a class name to simply be a memoized
  string
* Simplified some italicization logic in <ScientificName>
* Fixed bug where higher rank species names were rendered as an illegible gray
  in ObsGridItem
2024-03-26 12:53:18 -07:00
Angie
248e51e011 1209 font styling fixes (#1257)
* Added font files for Book and Semibold, Added MediumText component.

* Update snapshots for font changes
2024-03-08 10:31:26 -08:00
Ken-ichi Ueda
b3fbbd799d Minor UI fixes for TaxonDetails explore btn & establishment means 2024-03-07 17:18:25 -08:00
Amanda Bullington
09b225a1e6 Pause button dark mode until post-MVP (#1019)
* Pause button dark mode until post-MVP; closes #994

* Update snapshots
2024-01-10 17:07:36 -08:00
Johannes Klein
66a0eda08d Dark mode styling button changes (#938)
* Add dark mode button snapshot tests

* Refactor dark mode styles to be a single function call

* Remove neutral button dark mode styling
2023-11-30 23:03:40 +01:00
Amanda Bullington
74f4238079 Increase pressable area of back button, Obs Edit (#931)
* Use custom header instead of react nav set options; expand back button padding; closes #907

* Wrap ObsEdit in SafeAreaView
2023-11-28 15:51:09 -08:00
Johannes Klein
2027d77ac7 772 zoom button (#796)
* Refactor prop name

* Use Text component with Whitney Medium for zoom text

* Use multiplication sign in zoom button

* Update snapshots to new prop handling

* Refactor device and other props into a container component

* Use neutral zoom position as starting point

* Show zoom button not for single lens devices

* Cycle through neutralZoom maxZoom and minZoom

* when the device has only one physical lens it should start in the min zoom
2023-09-25 21:00:47 +02:00
Amanda Bullington
4942664432 Replace IconButton with INatIconButton (#749)
* Replace IconButton with INatIconButton

* Fix tests
2023-08-28 13:01:48 -07:00
Amanda Bullington
e26db07cf4 Make INatIconButton throw when no accessibilityLabel and fix errors (#748) 2023-08-25 08:46:32 -07:00
Ken-ichi Ueda
af2a5fbcb8 Replace current loc button w/ loading; make lower right interactive 2023-07-31 13:19:32 -07:00
Ken-ichi
7ae95519ea Iconic taxa icons (#723)
* Added iconic taxa icons; cleaned up some other icon files
* Updated snapshots
* Renamed ban icon to match fontawesome convention we use on the web
2023-07-28 10:22:34 -07:00
Johannes Klein
7d0f011340 Do not log error o console when it is expected to be thrown in icon button test
Fixes #674
2023-07-07 12:35:29 +02:00
Amanda Bullington
d58415dd27 UI for side menu (#668)
* Update side menu

* UI for side menu

* Add placeholder components; adjust for small screen sizes

* Code cleanup

* Update snapshots

* Query for second username element in e2e test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-06-26 10:34:51 -07:00
Ken-ichi Ueda
b2d7f0aff4 Remove slivers of white around check button on StandardCamera 2023-06-02 12:07:46 -07:00
Amanda Bullington
f742aec7fd Tappable areas bigger in camera on phones (#652)
* Expand tappable areas in camera on handsets; closes #624

* Fix tests
2023-05-31 11:55:48 -07:00
Ken-ichi Ueda
772c99a33e Added active opacity to Button; use solid colors for disabled buttons 2023-05-22 16:15:13 -07:00
Johannes Klein
1439c40c6a Upgrading the app to react-native 0.71.7 (#592)
* Changes in the unproblematic files

* Remove manually linked react-native-config

* Updates to files because of upgrade

* RN 71 and dependencies packages

* Update snapshot tests

* RN 71.1

* Fix missing jest mock

* RN 71.7

* Missing mock

* Fix errors with apisauce and axios

* Remove react-native-codegen direct dependency

* Code style
2023-04-25 17:18:24 +02:00
Johannes Klein
376144b750 Upgrade to Jest 28, breaking changes 2023-04-24 17:24:52 +02:00
Ken-ichi
5747d4d1d9 Several minor UI fixes (#572)
* use `shrink` tailwind class instead of hard-coded max widths to control
  overflow in a few situations
* fixed some spacing issues with the Toolbar during upload
* center text in buttons by default
* export KebabMenu from SharedComponents (how was it working without this?)
* added some extra colors for debugging purposes
2023-04-17 15:50:39 -07:00
Amanda Bullington
bbc5b9d67d MyObservations refactor (#510)
* WIP: very rough start at pulling state up into a container for MyObservations

I made a parallel MyObservations component and container so ObservationViews
can still be used as a working reference, but the ultimate goal here is to
focus MyObservations on presentation, and pull state and other business logic
up into a container component. This should make MyObservations a bit more
testable and clean up a very large and confusing file.

I'm also trying to move away from a generalized representation of observations
on all screens, which is why I want to name it MyObservations and not
ObservationViews. MyObservations has a lot of unique functionality that we
won't need elsewhere, and we can modularize stuff when we need to use it in
multiple places.

* UI updates for header, toolbar, empty component

* Add pressable component and login sheet

* UI improvements; get infinite scroll working

* UI improvements & additions for empty screen & bottom sheet

* Show login sheet when a user presses sync but is not logged in

* Fix backdrop close for AddObsModal

* Move UI elements to MyObservations

* Fix unit tests for MyObservations

* Fix for login sheet

* Set header height to a different height on Android to account for safe area

* Fix failing tests & rerender of user icon in navbar

* Remove scientific name from DisplayTaxonName to match Figma UI

* Set height above toolbar dynamically for sticky toolbar

* Add prop to display or hide second name in DisplayTaxonName

* Use RN styling to style grid view for MyObs flatlist

* Fix failing project obs test

* Create separate ToolbarContainer to separate presentation from logic; fix upload count

* Merge main and show onboarding based on user's total obs count

* Fix display taxon name styling and remove header fade on iOS

* Add header text for 0 observations, logged out state

* Update infinite scroll to 50 obs at a time; make loading wheel show faster

* Add uploaded status to toolbar

* Apply bandaid fix to stop Android from crashing on start

* Start adding new icons to MyObs

* Add circular progress; show upload icons at correct times during upload

* Add disabled props for accessibility state

* Fix tests; update snapshots

* Code cleanup

* Code cleanup & add inaturalist icon

* Fix merge conflict and add icon

* Add inaturalist icon

* Fix navigation to obs list and toolbar status when upload completes

* Move showLoginSheet code to MyObsContainer

* Fix toolbar status text

* Sync toolbar with upload status progress

* Clear toolbar after nav

* Tests passing

* Update e2e test

* Target login button in e2e tests

* Fix failing e2e tests with new testID for login button

* Update button snapshot to include new testID

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-03-14 10:54:33 -07:00
Johannes Klein
621c39dfda 415 snapshot testing for UI buttons (#458)
* Add font weight to Typography elements

* Add Heading5

* Typography snapshot tests

* Add letterSpacing to Heading 4 and 5

* Update Button padding

* Update Button styling

* Add rounded-lg

* Code style and comments

* Add button tests

* Added loading state color to buttons

* Add default color to text

* Use text class name instead

* Change text

* Add non default color text

* Snapshot for icon

* Default text color into button snap

* Update INatIcon.js

* Add Divider component

* Updates to Tabs UI

* Update color

* Add Divider test

* Show underline only when active

* Tabs snapshot

* Update Button UI

* Revert "Update Button UI"

This reverts commit 5361f57dac.

* Update ActivityCount.js

* Get color from theme in buttons

* Use translated string for hints in Tabs snapshots

* Refactor fct args

* Update Tabs

* Remove async

* Use .each in Button test

* Remove comment

* Structuring

* Remove duplicate application of style defaults

* Remove async from Typography
2023-02-15 11:31:16 +01:00