DEV Community

Igor Montagner
Igor Montagner

Posted on

One PR a month: February and March

Since I did not publish a report in February, I am doing a joint February + March post using a couple PRs I recently sent.

One of the things I like about elementary is the care taken with UX. For instance, for less experienced users pasting random commands in the terminal is a sensitive operation, specially if these commands involve administrative privileges. For this reason, elementary's terminal app shows a warning when the user pastes commands involving sudo or with newlines.

Paste Protection dialog

Two issues were raised with this dialog:

  1. That details field did not exist (issue #562), so it was hard for the used to check the if the command being pasted was really dangerous
  2. Pressing Escape would paste the text anyway (issue #293).

Although both seem like very simple issues, everything is done taking into account these small details. This contributes to the polished feeling elementary has.

Fixing the first was really simple: the paste protection dialog inherits from Granite.MessageDialog. This class has a method show_error_details that creates the small collapsible text box. I just needed to call it with the appopriate text and call it a day: PR #563. It was almost instantly approved.

The second issue was also simple: the dialog returns 1 if the "Paste Anyway" button is pressed and 0 if the "Don't paste" button is pressed. The code that checked if pasting should be cancelled was akin to if (response == 0). I'm not sure what pressing Escape returns, but I'm pretty sure that text should only be pasted if response == 1. So I changed the condition and now pasting works. This was done in PR #569.

An important point of both PRs is that they are very simple. I used these to emphasize the contributing does not require superior ultra coding skills, just some pacience and a little effort. There are many issues that are easy and up for grabs not only in elementary but also in many other projects.

If you decide to take this challenge as well leave a comment. Or if you need help finding easy issues in elementary ;) Or anything , really.

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay