Commit Graph

41 Commits

Author SHA1 Message Date
Johannes Klein
b4516b7b25 Update react native to v0.78.x (#3043)
* Update package.json

* Update package.json

* Updates for native files with upgrade-helpers

* Update .flowconfig

* Update package-lock.json

* Update Podfile.lock

* Add react-dom types

* Update package-lock.json

* Wrong install

* Use types-react-codemod

* Update TaxonSearch.tsx

* Remove react-native-accessibility-engine dependency

This is currently not maintained and not compatible with RN 0.78

* Comment out accessibility tests

* Disable broken snapshot test

* Move broken test

* Move broken test

* Move broken test

* Remove duplicate file

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken tests

* Move broken test

* Remove duplicate file

* Move broken tests
2025-08-09 13:47:46 +02:00
Amanda Bullington
bb31c1907b Update react navigation libraries for performance (#2903)
* Update navigators and create util for tabstack navigation

* Changes for react navigation 7

* Refactor to use navigateToTabStack throughout app

* Add comment about unmountOnBlur

* Get all unit tests passing; remove navutils & mock HeaderBackButton

* Fix animation issues in tests

* Temporarily remove parts of tests with back functionality

* Fix tests

* Delete ios/iNaturalistReactNative.xcodeproj/project.pbxproj

* Fix pbxproj

* Code cleanup; minimize unnecessary changes

* Fix tests

* Downgrade react-native-screens to v4.4.0 (#2918)

react-native-screens version 4.5.0 increases the react native version that it supports to 0.74.0+ (https://github.com/software-mansion/react-native-screens/pull/2613/files). So, by using 4.4.0 we are still able to build the app on Android as we are still on 0.73 for now (have tested and it works).
Have not seen any effect on the changes related to the latest react-navigation versions.

* Make requested changes

* Speed up Explore nearby tile loading (#2912)

* Create a performance tracker to show urltile load time in debug mode

* Set default radius to 1km, not 50km

* Code cleanup & TypeScript definitions

* Fix TypeError

* Address eslint error

* Make github actions happy

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>

* New Crowdin translations by GitHub Action (#2920)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* MOB-690 - Add error context to 401 errors (#2921)

* MOB-690 - Add error context to 401 errors

* Add Object.defineProperty like in the other error classes

* Add logger line

* Also throw 401 error if the error object has no response property

---------

Co-authored-by: Yaron Budowski <budowski@gmail.com>

* v1.0.4+164

* Rebase with latest version of RN screens. Remove unused code and packages, add eslint package for TS, suppress TS errors (#2924)

* New Crowdin translations by GitHub Action (#2926)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by GitHub Action (#2929)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Use 3 separate initial routes for tabs; hide animations on drawer screens

* Fix test

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
Co-authored-by: Ken-ichi <kenichi.ueda@gmail.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Yaron Budowski <budowski@gmail.com>
2025-05-30 09:26:47 -07:00
Angie
cd6d6543f1 Add login button where logout button is on menu (#2891)
* Add login button in menu where the logout button is

* Update snapshots

* Changes to fit design
2025-05-14 10:00:04 -07:00
Amanda Bullington
d4d29b3aa8 Fix icons for dropdown carets in ObsEdit (#2748)
* Add icon

* Add icon

* Add icon

* Fix triangle dropdowns on ObsEdit other data section

* Update snapshots
2025-03-12 14:53:45 -07:00
Johannes Klein
626fbfd94f Full screen loading state on match screen (#2717)
* Build UI for loading state between AI->Match

* Make designs for AI loading screen match Figma

* Selective changes from bf872e2d4f

* Selective changes from 9ed81f99c7

* Selective changes from 4bc7c3474f

* Selective changes from 4916cf70fb

* Replace loading state from store with props

* Add some types

* Make component agnostic of what skipping does

* Remove debug info

* Add more debug data

* Elongate loading state if online errors out and offline is still loading in sequence

* Remove underline

This classname had no effect as far as I can tell.

* Hide skip button when it has no function

* Remove a comment that slipped through partial cherry-picking

* Split apart online and offline fetch status

Weird but even though they start in sequence it happened to me that online error was received after offline was fetched successfully. So, Let's split apart online and offline loading state.

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2025-03-07 11:50:49 +01:00
Johannes Klein
e2ee6170ea Some camera design changes with using geomodel (#2677)
* Do not show double gap for when no zoom button to show

* Add location-off icon

* Basic location button for camera

* Do not show new button in default mode

* In advanced mode using geomodel is opt-in with the button state

* Basic info box layout

* Add opacity

* Update strings.ftl

* Use location if present

* If no location permission given, show permission gate on pressing use location

* Minor restyle for offline text

* Refactor LocationStatus and add animation

* Update snapshot tests
2025-02-20 11:32:47 +01:00
Ken-ichi
736eba5a52 feat: add labels to tab buttons (#2611)
* feat: add text labels to bottom tabs
* fix: treat icon and text as single pressable for screen readers in bottom tabs
* feat: float AddObs button outside of bottom tab bar

Closes MOB-254

---------

Co-authored-by: Kirk van Gorkom <55742+kvangork@users.noreply.github.com>
2025-01-21 11:20:48 -08:00
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