30 Commits

Author SHA1 Message Date
Ryan Stelly
b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00
Amanda Bullington
f8bce67501 Creative day: drawer and tab navigator dark mode (#2945)
* Add dark mode to tab and drawer navigation

* Remove log

* Add color for darkModeGray and make dark mode debug only
2025-06-25 10:00:01 +02:00
Amanda Bullington
37f6a5d7bf Remove old stylesheets (#1417)
* Remove old stylesheets and unused dictionaries

* Remove old stylesheets and unused dictionaries; cleanup global shadow styles

* Fix Heading1; update Tailwind config; add jest clear cache

* Update snapshots
2024-04-18 15:39:19 -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
Amanda Bullington
9c96e1e443 Allow user to navigate to ObsEdit when no suggestions found (#1379)
* UI updates when no suggestions from Camera; closes #1366

* Fix suggestions loading test
2024-04-09 16:06:11 -07:00
Ken-ichi
0f67a10fe4 Obs grid view updates (#1241)
* Adjust iconic icon size, dark gradient size and breaks for ObsGridItem, hide noevidence when photos
* Layout consistency for upload status
2024-03-01 09:45:10 -08:00
Ken-ichi
954ee922cf Added debug mode for showing diagnostic info and debug screens (#1237) 2024-02-28 19:35:24 -08:00
Johannes Klein
db050865d7 Show Focus square on cameras that do not focus; plus style changes (#1117)
* Show the focus square at the tapped coordinates even if we do not actually set the focus

* Add new tailwind color

* Add new border radius value

* Restyle focus square according to current designs
2024-02-06 22:37:39 +01:00
Amanda Bullington
cd18e970d7 Taxonomy component, TaxonDetails (#978)
* Style taxonomy ancestors and current taxon

* Link to TaxonDetails pages

* Add children to TaxonDetails taxonomy

* Add children taxa toggle

* Display children after button tap

* Wrap text'

* Fix italic font size in DisplayTaxonName

* Add tests to Taxonomy component

* Change Taxonomy test
2023-12-19 11:04:30 -08:00
Johannes Klein
5c31cd2e1b Group photos UI (#780)
* Move onboarding into list header

* Use FlashList for group photos list

* Use INatIconButton in GroupPhotos

* Add opacity to disabled INatIconButton

* Calculate number of columns and item width based on screen width

* Refactor of icon button

* Add some padding border to cope with buttons

* Add a plus button to add photos

* Minor style fixes; allow some header options to work with ContextHeader

* Refactor nested ternary

---------

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2023-09-18 15:03:56 +02:00
Ken-ichi Ueda
772c99a33e Added active opacity to Button; use solid colors for disabled buttons 2023-05-22 16:15:13 -07: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
Angie
ae8e85098f 474 adjust photopreview sizes in standardcamera for different breakpoints (#559)
* Adjust PhotoPreview sizes for StandardCamera for different breakpoints

* PhotoCarousel tests

* Merge main into branch

* PhotoPreview styling after merge

* Update PhotoCarousel snapshots

* Moved getBreakpoint into Sharedhelper, changes requested.

* PhotoPreview for large layouts

* Remove testing color

* Update snapshots

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-04-06 13:09:17 -07:00
Angie
c3ad393a0d 455 update colors and unify usage in the app (#505)
* Update tailwind colors to match current designs, update PaperProviderColors, unify usage

* Change snapshot test colors to match current design colors

* Added accessibility labels

* Edited accessibility labels

* Remove surface color, unify usage

* Update colors
2023-03-06 11:43:42 -08:00
Angie
8ce4893625 Merge pull request #490 from inaturalist/469-customize-tailwind-breakpoints
Adding tailwind breakpoints for screens
2023-02-21 00:46:32 -08:00
Chris
bcdc7a345c Add ability to select obs preview image (#491)
* Add ability to select obs preview image

* Use Inat icon

* lint

* Make icon smaller

* Change icon dimensions

* Add border radius to theme

* Add ability to select obs preview image

* Use Inat icon

* lint

* Make icon smaller

* Remove empty lines

* Update UiLibrary.js

* Update UiLibrary.js

---------

Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
2023-02-20 17:02:11 +01:00
Angie Ta
0fedf41c4f Adding tailwind breakpoints for screens 2023-02-16 16:05:52 -08: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
Angie Ta
fec4ac5061 ActivityHeader icons, cleanup 2023-02-10 01:24:45 -08:00
Amanda Bullington
1caaa595df Add italic Whitney font (#451)
* Add italic Whitney font to tailwind & DisplayTaxonName
* Switch to using className italic instead of fontFamily
2023-02-09 14:55:36 -08:00
Angie
e14d620992 301 flag id functionality obsdetail (#333)
* Flag Id Modal created.

* Flag item modal radio buttons, styling, cancel button

* Flag Item Modal, Api Flags file created

* Added id field in Identifications realm schema, Flag Item Modal API call

* Clear form, toggle function, click title not just checkbox to toggle

* Fixed android checkbox toggle.

* Clean up. Flag ID ObsDetail. Closes #301.

* Flag realm model, flagged status shown on initial load

* Refresh observation after item flagged. In Progress.

* Remove console logs, add onError

* save button loading spinner

* Realm 31 migration for obsservation updated_at

* Flags test file

* FlagItemModal tests

* FlagItemModal tests

---------

Co-authored-by: Amanda Bullington <albullington@gmail.com>
2023-02-03 13:09:56 -08:00
Amanda Bullington
7d39c0f919 UI redesign: Typography components (#402)
* Add heading typography components

* Add typography components for body, list, and subheading

* Add font sizes/line heights to tailwind css

* Replace Text components in UI library with new typography; closes #383

* Update pixel size of fonts and use Heading2 throughout UI library

* Remove repeated logic from code

* Fix sizes for typography components
2023-02-01 12:40:25 -08:00
Amanda Bullington
3f125beab6 Framework for adding custom icons to iNatRN (#414)
* Add custom iNat icon font to iOS and Android
* Add custom icon to iNat UI library
* Create custom iNat icons using IconButton for add obs modal & footer
* Add icon placeholders to observation edit screen
* Test fixes for accessibility
* Move paper provider into new component; fix names in UI library
* Update README with clarified directions about changing the name of the .ttf file
2023-01-31 16:45:11 -08:00
Chris
e825cb88c5 Fix overridden border radius (#413)
* Fix overridden border radius

* Extra comma
2023-01-30 10:45:45 +01:00
Amanda Bullington
4597245b38 Update Button component with new styling (#388)
* Update Button component with new styling; closes #384
* Change button to Pressable instead of RNPaper to get border to show on Android
* Add disabled buttons to UI library
* Add multiple buttons in row
* Add multiple button examples
2023-01-26 16:05:14 -08:00
Ken-ichi
7a7e6619e7 Fix sign out after force quit in Android (#375)
Removes intentional Realm file deletion to avoid unintentional Realm file deletion, though the latter remains something of a mystery.

* Configure Realm with the full path to the file
* Remove all Realm.open calls in AuthenticationService in favor of passing the
  context/provider copy of realm (only one realm instance)
* Only delete the realm file on sign out if deleting realm contents fails for
  some reason
* Replaced deleteRealm with semantically more accurate clearRealm

Closes #373
2023-01-23 18:34:58 -08:00
Angie
a9ca4ff02b Replacing styles/colors.js with tailwind theme colors. Closes #196. (#209)
* Replacing styles/colors.js with tailwind theme colors. Closes #196.
* Added tailwind colors alias into babel module resolver extension, changed tailwind-colors.js to tailwindColors.js.
2022-10-31 20:38:06 -07:00
Amanda Bullington
a07ee979e6 Custom fonts (#192)
* Add Whitney fonts to project
* Use styled components to pass whitney as default font for all app text
* Add header component using Papyrus as default font
* Update realm and add custom font examples for Android

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-10-20 15:23:10 -07:00
Amanda Bullington
c740a06224 Start using Tailwind CSS (#185)
Starts changing styles over to tailwind via nativewind.

* Update node to 16.17.0
* Use styled() to ignore flow errors about className or tw props when styling components with nativewind
* Upgrade realm to make test suite run; set failing test in Explore as todo
* Add workaround for getting pods to run with XCode 14
* Fix for loading remote obs with infinite scroll
* Add styling section to README
* Use IconButton from rn-paper to make buttons more responsive to press
* Add caret next to camera roll album picker
* Fixed broken addition of gallery photos to existing observation
* Removed flatlist from scrollview on ProjectDetails (apparently not allowed?)
* Moved border style from Image to container in PhotoCarousel (border color
  not allowed for images?)

Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
2022-10-19 17:15:55 -07:00