Commit graph

12 commits

Author SHA1 Message Date
Dhurba baral
f3453b0d24
Skips newline when validating character count (#19646)
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Philip How <philip.j.how@gmail.com>
Co-authored-by: Mai Irie <mai@forem.com>
2023-07-07 14:35:29 -04:00
Lawrence
33295ac58c
Update messaging to be Bio (#18798)
* Update messaging to be Bio

* Update app/validators/profile_validator.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/validators/profile_validator.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/validators/profile_validator.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/validators/profile_validator.rb

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update app/validators/profile_validator.rb

Co-authored-by: Joshua Wehner <joshua@forem.com>

* adding rails translation to profile

* implement base for record error

* fix spec

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joshua Wehner <joshua@forem.com>
2022-12-09 13:15:46 -06:00
Gajanan Patil
cade1453f5
Convert CRLF to LF when validating summary (#18140)
Co-authored-by: gajananpp <patil.gajananps@techforce.ai>
2022-07-26 12:21:34 +01:00
yheuhtozr
adc757f5a5
app/validators i18n (#16166) 2022-01-19 05:25:39 -05:00
Michael Kohl
08d82e7256
Profile generalization: cleanup (#12947)
* Remove hardcoded instances of education field

* WIP Access display_email_on_profile via User Settings

* Remove unused profile column

* WIP Fix reference to bg_color_hex and text_color_hex

* WIP fix issues revealed by systems specs

* WIP fix issues revealed by services specs

* WIP Fix failing tests

* WIP Fix spec failures

* wip

* Move two attributes from controller to decorator

* Update comment

* Match user settings changes

* More consistently use user.tag_line

Even before the profile changes we sometimes used the user.summary
attribute directly but used the user.tag_line method in other places.

* Remove delegation, rename inline concern

* Drop profile columns from users table

* Remove duplicated work display from header

* Update work profile field handling

* Update DUS + spec

* Delegate more carefully

* Update delegation guard

* Adapt for removed delegation

* Undo accidental schema changes

* Fix seeds

* Remove accidentaly change

* Fix User#processed_website_url

* Update guard clause

* Update profile card content

* Add Organization#profile

* Be more conservative with profile fields

* Spec fixes round 1

* Fix typo

* Update spec

* Limit number of header fields and update card content

* Decorate correct model

* Update factory

* Update schema.rb

* Fix validation

* How bad could this possibly be?

* Pretty bad, nevermind

* Remove obsolete code

* Reset profile fields during test runs

* Move profile fields back to before(:suite)

* Spec fixes

* Remove accidentally re-added files

* More spec fixes

* Specs

* Change User#tag_keywords_for_search

* More spec fixes

* Add comment

* Undo accidental schema changes

* Attempt spec fix

* Remove fix attempt

* Fix e2e test

* Update spec

* Remove guard clause

* Remove hardcoded instances of education field

* WIP Access display_email_on_profile via User Settings

* Remove unused profile column

* WIP fix issues revealed by systems specs

* WIP fix issues revealed by services specs

* WIP Fix failing tests

* WIP Fix spec failures

* wip

* Move two attributes from controller to decorator

* Update comment

* More consistently use user.tag_line

Even before the profile changes we sometimes used the user.summary
attribute directly but used the user.tag_line method in other places.

* Remove education

* Add comment

* WIP

* Clean up mostly_work_with

* WIP

* Update work profile field handling

* More work-related changes

* Remove settings_only from display_area enum

* Remove quickfix from _metadata partial

* Remove special attributes

* Remove leftover spec

* Retrieve location from profile, not user

* Profile.special_attributes no longer exists

* Update specs

* More spec fixes

* Update UsersController

* Update UsersController and spec

* Fix e2e seeds

* Minor cleanup

* More e2e seed fixes

* Fix profile field CSV

* Fix e2e seeds

* Move one more attribute in e2e seeds

* Remove duplicate line

* Clear inputs before typing in them

* Fix formatting issues

* Profiles::Update -> Users::Update

* Remove RegistrationsController#resolve_profile_field_issues

* Fix schema.rb

* More cleanup

* Fix specs

* Fix remaining spec

Co-authored-by: Jacob Herrington <jacobherringtondeveloper@gmail.com>
2021-08-20 16:36:02 +02:00
Michael Kohl
84a85fe1a4
Remove color_field input type from profiles (#14239)
* Move brand color validation to Users::Setting

* Fix specs

* Remove color_field as ProfileField input type
2021-07-19 18:42:36 +07:00
Michael Kohl
9794305412
Remove unused profile fields (#14206)
* Remove unused profile fields

* Clean up CSV

* Account for user settings in Profiles::Update

* Move brand color validation to Users::Setting

* Fix specs
2021-07-16 09:45:12 -04:00
Michael Kohl
83dc9408b6
Drop profile fields for static attributes (#14109)
* Drop profile fields for static attributes

* Update profile page with static field form

* Fix specs

* Update Cypress test
2021-07-01 14:30:40 -04:00
Jacob Herrington
45e45491b1
Migrate "static" profile fields into new columns (#13641)
* Move static profile fields to profiles columns

In order to remove some ambiguity around the availability of certain
profile fields, we can designate certain fields as "static." These
fields are intended to exist on every Forem regardless of configuration;
they contain basic personal info that most Forem's will likely use.

Because these fields already exist on some Forems it is necessary to
migrate the data from existing profile's data column to their respective
columns.

This change should behave as expected irrespective of the existence of
the static fields having associated ProfileFields, however, the UI that
is rendered in a user's settings still depends on the presence of the
ProfileFields. We can address that in a future change when we are
prepared to delete those ProfileFields entirely. We should make sure the
migration occurs without issue before moving to that step, in my
opinion.

* Apply suggestions from code review

Co-authored-by: Michael Kohl <me@citizen428.net>

* Add clarifying comments

Co-authored-by: Michael Kohl <me@citizen428.net>

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-05-26 14:40:18 -05:00
Jacob Herrington
563a2c5a22
Fix misleading comment (#11847)
I'm updating this comment based on @citizen428's feedback.

https://github.com/forem/forem/pull/11836#discussion_r539811288
2020-12-10 12:34:23 -06:00
Jacob Herrington
f2722f8701
Don't attempt to call summary on profile during onboarding (#11836) 2020-12-10 08:55:46 -05:00
Michael Kohl
8f5cfa2c0f
Drop profile columns from user (#10707)
* Prepare to drop profile columns from user

* Update code and factory

* Also remove unused constant

* Move validation from user to profile

* Remove Profiles::ExtractData service object

* Add more comments

* Simplify sameAs attribute generation

* Obey me machine, I am your master

* Fix condition order in guard clause

* Temporarily disable callback

* Fix specs

* Reduce usage of Profile#refresh_attributes!

* Remove leftover comment

* Handle social media links differently

* More spec fixes

* Fix specs for admin profile fields controller

* Fix specs after merge

* Fix remaining specs

* Update user show request spec

* Add comment for follow_hiring_tag

* Only save profile when user is valid

* Fix seeds.rb for profile fields

* Switch from before_save to after_save

* Undo unrelated formattin change

* Update spec/fixtures/files/profile_fields.csv

Co-authored-by: Molly Struve <mollylbs@gmail.com>

* Remove data update script and spec

* Fix spec

* Fix typo in comment

* Fix typo in comment

* Move article resave logic to service object

* Move profile field creation to before(:suite)

* Refactor error handling in Profiles::Update

* Fix Profiles::Update specs and refactor

* Temporarily disable spec

* Add ProfileValidator

* Clean up

* Move DB ready check into app/lib

* Refresh attributes after importing from CSV

* Fix specs

* Remove unused file

* A girl has no name. A profile neither.

* Fix specs

* Add responds_to? check

* Spec fix

* Add name to user fields in profile settings page

Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-12-03 08:14:38 +07:00