Public view for suggested actions as well as resources has been
completelly redesigned.
Private side for this feature has been adapted as well in order to meet
the requirements.
Banner sections can be saved (one banner can appear in several sections)
If the hex color is changed in the textfield, the color of the color picker changes.
The migration to generate the columns needed for the feature.
There are three new columns:
moderated: a boolean that, when true, it means a moderator has
hidden a proposal notification. The notification is hidden immediately
and it's shown in the moderators proposal notifications index.
hidden_at: used by acts_as_paranoid to hide the notification from the list.
It's like deleting it, but without deleting definitely from DB.
ignored_at: used to mark as a notification as ignored, so that it will
appear in marked as reviewed and not in the pending list. WARNING! this
doesn't mean that it will disappear from the 'All' filter.
Note there is some funkiness going on with class loadings
Had to create a `feed` and `widget_feed` table even though in this
first version the Widget::Feed includes only uses ActiveModel instead
of ActiveRecord, otherwise some specs failed
We’ll figure it out and clean up 😌
- Cleanup Translatable module (`translation_params` method too large)
- Move globalize_helpers partial to admin folder
- Use any class for method translation_params
- Helpers in `GlobalizeHelpers` make sure all are in use and see if they can be more legible
- Review js name clases and methods see if they can be more legible
- Refactor milestone views into partials with nice spacing between attributes
Why:
Newsletter attribute `segment_recipient` is an integer to be used as
enum. There's no advantage to store a number instead of an string if the
ammount of elements in the table is not going to be huge, or we can take
advantage of using an enum.
Also maintaining both Newsletters enum paired with UserSegments::SEGMENTS
would be a maintenance burden.
How:
* Migration to change segment_recipient column from integer to string
* Removing enumeration from Newsletter model class
* Using UserSegments::SEGMENTS instead of Newsletter.segment_recipients
or integer values
Why:
Budget Investment's valuators need to be able to comment on investments
without making those comments public. We need a way to clearly make a
distinction to avoid "leaking" internal valuation comments.
How:
Adding a boolean `valuation` attribute defaulted to false to the Comments
table, and index on it with concurrent algorithm as explained at
https://robots.thoughtbot.com/how-to-create-postgres-indexes-concurrently-in
The name `valuation` was chosen instead of `internal` because of the more
specific meaning as well as avoiding a collision with existing internal_comments
attribute on Budget::Investment model (soon to be deprecated & removed)