Skip to content

Commit

Permalink
Merge pull request #1763 from SFDigitalServices/release-01-09-2023
Browse files Browse the repository at this point in the history
January 2023 Release
  • Loading branch information
christine-sfg authored Jan 17, 2023
2 parents 991d9a0 + d20eb80 commit 870aa83
Show file tree
Hide file tree
Showing 18 changed files with 224 additions and 48 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
defaults: &defaults
working_directory: ~/web
docker:
- image: cimg/ruby:2.5.9-browsers
- image: cimg/ruby:2.6.8-browsers
environment:
RAILS_ENV: development
PGHOST: 127.0.0.1
Expand Down Expand Up @@ -166,7 +166,6 @@ jobs:
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
chmod +x ./tmp/cc-test-reporter
./tmp/cc-test-reporter before-build
- setup-webdriver
- persist_to_workspace:
root: .
paths:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby '2.5.9'
ruby '2.6.8'

# same method is used in https://github.com/rails/rails/blob/master/Gemfile
git_source(:github) do |repo_name|
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ DEPENDENCIES
webpacker-react (~> 0.3.2)

RUBY VERSION
ruby 2.5.9p229
ruby 2.6.8p205

BUNDLED WITH
2.2.31
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ This repository contains the source code for [housing.sfgov.org](https://housing
Before you install DAHLIA, your system should have the following:

- [Homebrew](http://brew.sh)
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/) 2.5.9 (Use [RVM](https://rvm.io/rvm/install) or [rbenv](https://github.com/rbenv/rbenv))
- [Ruby](https://www.ruby-lang.org/en/documentation/installation/) 2.6.8 (Use [RVM]
(https://rvm.io/rvm/install) or [rbenv](https://github.com/rbenv/rbenv))
- [Bundler](https://github.com/bundler/bundler) `gem install bundler`
- [PostgreSQL](https://postgresapp.com/)
- [Node.js](https://nodejs.org/en/) 14.19.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@
a.button.secondary.expand.no-margin ui-sref="dahlia.housing-counselors"
| {{'listings.apply.find_a_housing_counselor' | translate}}
div ng-if="::$ctrl.parent.isSale($ctrl.parent.listing)"
a.button.secondary.expand.no-margin href="https://www.homeownershipsf.org/application-assistance-for-homebuyers/" target="_blank"
a.button.secondary.expand.no-margin href="https://www.homeownershipsf.org/buyerapplications/" target="_blank"
| {{'listings.apply.visit_homeownership_sf' | translate}}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports[`BeforeApplyingForSale display Before Applying when type is Habitat list
</li>
</ol>
<div
className="text-gray-750"
className="text-gray-750 primary-lighter-markup-link-desktop"
>
<p>
Read
Expand Down Expand Up @@ -145,7 +145,7 @@ exports[`BeforeApplyingForSale display Before Applying when type is directory 1`
</li>
</ol>
<div
className="text-gray-750"
className="text-gray-750 primary-lighter-markup-link-desktop"
>
<p>
Read
Expand Down Expand Up @@ -235,7 +235,7 @@ exports[`BeforeApplyingForSale display Before Applying when type is listing deta
</li>
</ol>
<div
className="text-gray-750"
className="text-gray-750 primary-lighter-markup-link-desktop"
>
<p>
Read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
Lottery winners will be required to fill out a building application and provide a copy of your current credit report, 3 most recent paystubs, current tax returns and W-2, and 3 most recent bank statements.
Expand All @@ -75,7 +75,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
All BMR renters must review and acknowledge the
Expand All @@ -92,7 +92,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
Applicants should be informed that BMR rental units in some buildings may convert to ownership units in the future.  In the case of conversion, BMR renters will be afforded certain rights as explained in ...
</span>
<span
className="button-toggle ml-1"
className="button-toggle ml-1 text-blue-700"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
Expand Down Expand Up @@ -159,7 +159,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
Special Notes
</h3>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
Some other excessively formatted listing notes.
Expand All @@ -178,7 +178,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
Proof of residence
Expand All @@ -195,7 +195,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm mt-4"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
Should your application be chosen from the lottery, be prepared to fill out a more detailed application and provide
Expand All @@ -222,7 +222,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
Some important program rules with bullets:
Expand All @@ -244,7 +244,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
The CC&R's explain the rules of the homeowners' association, and restrict how you can modify the property.
Expand Down Expand Up @@ -277,16 +277,16 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
</span>
3% of the sales price
<div
className="flex mt-4"
className="mt-4"
>
<span
className="font-bold mr-1"
className="font-bold"
>
How to receive it:
</span>
<span>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
Register with the Leasing Agent
Expand All @@ -308,7 +308,7 @@ exports[`ListingDetailsAdditionalInformation displays additional information sec
className="text-sm"
>
<div
className="text-sm"
className="text-sm inline primary-lighter-markup-link"
>
<span>
A BMR unit will be resold at a restricted price to a household that meets the first‐time homebuyer and income qualifications for the program. Please review the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</p>
</div>
<div
className="mb-4"
className="mb-4 primary-lighter-markup-link-desktop"
>
<p>
People in your household may need
Expand Down Expand Up @@ -430,7 +430,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</p>
</div>
<div
className="mb-4"
className="mb-4 primary-lighter-markup-link-desktop"
>
<p>
People in your household may need
Expand Down Expand Up @@ -726,6 +726,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</div>
<p>
<a
className="md:text-blue-700"
href="https://us.awp.autotask.net/1/filelink/113bd-37ed41a1-53a7f01459-2"
target="_blank"
>
Expand Down Expand Up @@ -851,7 +852,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</li>
</ol>
<div
className="text-gray-750"
className="text-gray-750 primary-lighter-markup-link-desktop"
>
<p>
Read
Expand Down Expand Up @@ -889,7 +890,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</p>
</div>
<div
className="mb-4"
className="mb-4 primary-lighter-markup-link-desktop"
>
<p>
People in your household may need
Expand Down Expand Up @@ -1108,7 +1109,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</p>
</div>
<div
className="mb-4"
className="mb-4 primary-lighter-markup-link-desktop"
>
<p>
People in your household may need
Expand Down Expand Up @@ -1404,6 +1405,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</div>
<p>
<a
className="md:text-blue-700"
href="https://us.awp.autotask.net/1/filelink/113bd-37ed41a1-53a7f01459-2"
target="_blank"
>
Expand Down Expand Up @@ -1480,7 +1482,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</p>
</div>
<div
className="mb-4"
className="mb-4 primary-lighter-markup-link-desktop"
>
<p>
People in your household may need
Expand Down Expand Up @@ -1776,6 +1778,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</div>
<p>
<a
className="md:text-blue-700"
href="https://us.awp.autotask.net/1/filelink/113bd-37ed41a1-53a7f01459-2"
target="_blank"
>
Expand Down Expand Up @@ -1888,7 +1891,7 @@ exports[`ListingDetailsEligibility displays listing details eligibility section
</li>
</ol>
<div
className="text-gray-750"
className="text-gray-750 primary-lighter-markup-link-desktop"
>
<p>
Read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ exports[`ListingDetailsApply displays habitat link for eligibility requirements
>
<a
className="button w-full transition"
href="https://www.homeownershipsf.org/application-assistance-for-homebuyers/"
href="https://www.homeownershipsf.org/buyerapplications/"
target="_blank"
>
Visit HomeownershipSF
Expand Down Expand Up @@ -124,7 +124,7 @@ exports[`ListingDetailsApply renders if listing is open 1`] = `
>
<a
className="button w-full transition"
href="https://www.homeownershipsf.org/application-assistance-for-homebuyers/"
href="https://www.homeownershipsf.org/buyerapplications/"
target="_blank"
>
Visit HomeownershipSF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ exports[`BuyHeader renders BuyHeader component 1`] = `
</li>
</ol>
<div
className="text-gray-750"
className="text-gray-750 primary-lighter-markup-link-desktop"
>
<p>
Read
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/BeforeApplyingForSale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const BeforeApplyingForSale = ({ beforeApplyingType }: BeforeApplyingForS
</li>
))}
</ol>
<div className="text-gray-750">{requirements}</div>
<div className="text-gray-750 primary-lighter-markup-link-desktop">{requirements}</div>
</>
)

Expand Down
18 changes: 15 additions & 3 deletions app/javascript/components/TextTruncate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,33 @@ import { renderInlineMarkup } from "../util/languageUtil"

export interface TextTruncateProps {
text: string
className?: string
buttonClassName?: string
}

export const TextTruncate = ({ text }: TextTruncateProps) => {
export const TextTruncate = ({ text, className, buttonClassName }: TextTruncateProps) => {
const [isExpanded, setIsExpanded] = useState(false)

truncate.setup({ ellipsis: " ... ", length: 400, reserveLastWord: true, keepWhitespaces: true })
const truncatedText = text ? renderInlineMarkup(truncate(text)) : ""
const untruncatedText = renderInlineMarkup(text)
let wrapperClassNames = ["text-sm inline"]
if (className) {
wrapperClassNames = [...wrapperClassNames, className]
}

let buttonClassNames = ["button-toggle ml-1"]

if (buttonClassName) {
buttonClassNames = [...buttonClassNames, buttonClassName]
}

return (
<div className="text-sm">
<div className={wrapperClassNames.join(" ")}>
{isExpanded ? untruncatedText : truncatedText}
{truncate(text)?.length !== text?.length && (
<span
className="button-toggle ml-1"
className={buttonClassNames.join(" ")}
onClick={() => setIsExpanded(!isExpanded)}
onKeyPress={() => setIsExpanded(!isExpanded)}
role="button"
Expand Down
11 changes: 11 additions & 0 deletions app/javascript/components/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,14 @@ nav {
color: var(--bloom-color-gray-700);
box-shadow: inset 0 0 0 1px var(--bloom-color-gray-700);
}

.primary-lighter-markup-link a{
color:var(--bloom-color-blue-700);
}


.primary-lighter-markup-link-desktop a{
@media (min-width: $screen-md) {
color:var(--bloom-color-blue-700);
}
}
Loading

0 comments on commit 870aa83

Please sign in to comment.