Skip to content

feature: make pinned article shake if wanted#5831

Open
magnusbrecke wants to merge 1 commit intomasterfrom
shake-article
Open

feature: make pinned article shake if wanted#5831
magnusbrecke wants to merge 1 commit intomasterfrom
shake-article

Conversation

@magnusbrecke
Copy link
Copy Markdown
Contributor

Description

Should be an option to wiggle pinned article to get some attention to it on the front page, but only for authenticated users.

Result

Skjermopptak.2026-01-20.kl.14.33.37.mov
  • Changes look good on both light and dark theme.
  • Changes look good with different viewports (mobile, tablet, etc.).
  • Changes look good with slower Internet connections.

Testing

  • I have thoroughly tested my changes..

Resolves ABA-1618
Related backend PR:

@magnusbrecke magnusbrecke self-assigned this Jan 20, 2026
@linear
Copy link
Copy Markdown

linear bot commented Jan 20, 2026

@github-actions github-actions bot added the review-needed Pull requests that need review label Jan 20, 2026
item={pinned}
url={itemUrl(pinned)}
meta={renderMeta(pinned)}
wiggle={pinned && isArticle(pinned) ? pinned.wiggle : false}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain what this line does?
What is isArticle(pinned) and why is it anded with pinned?
(I'm just curious)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I am checking if there exists a pinned "element" which could be more than just an article, and then checking if the pinned "element" is an article. If both true, wiggle will be pinned.wiggle which can be either true or false, chosen in the edit or create article shown in the video, and if not both are true, wiggle will be false.

Copy link
Copy Markdown
Member

@ShaileshS1702 ShaileshS1702 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@ch0rizo ch0rizo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@celiacisternas celiacisternas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no comment


<Field
label="Wiggle på forsiden"
name="wiggle"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wiggle??? what the heck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-needed Pull requests that need review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants