Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1, Allow tabs to adjust their size when there are too many tabs. 2, Highlight the words in finding and replacing them #8005

Closed
wants to merge 2 commits into from

Conversation

soarcreator
Copy link

I fixed the problem when there are too many tabs on the Editor header. When the remaining space is not enough, all tabs become as small as it is necessary to be to squash into the space.

I fixed the problem when there are too many tabs on the Editor header. When the remaining space is not enough, all tabs become as small as it is necesary to be to squash into the space.
@facchinm
Copy link
Member

Hi @soarcreator , thanks for your contribution!
Did you have the chance to test the beta version of the IDE? It contains a bunch of commits to improve the tabs experience (scrolling tabs + size being adjusted). It still has some bugs (and for this reason it has not been merged in mainline yet).
Would you mind taking a look and helping us to solve the problem for good? Thanks a lot!
The relevant commits are d11c796 5f4daff 17d77d1 d369727

@facchinm facchinm added On Hold The pull request is blocked from being merged IDE 1.9.x Beta Related to the Arduino IDE Beta Build labels Sep 17, 2018
When finding and replacing the words, all these words are now highlighted yellow for the sake of visibility.
@soarcreator soarcreator changed the title Allow tabs to adjust their size when there are too many tabs Allow tabs to adjust their size when there are too many tabs, and Highlight the words in finding and replacing them Sep 18, 2018
@soarcreator soarcreator changed the title Allow tabs to adjust their size when there are too many tabs, and Highlight the words in finding and replacing them 1, Allow tabs to adjust their size when there are too many tabs. 2, Highlight the words in finding and replacing them Sep 18, 2018
@soarcreator
Copy link
Author

Hi, @facchinm
I looked at these commits. d11c796 5f4daff 17d77d1 d369727

Are you trying to change the tab size, depending on whether the tab is selected or not selected?
If so, change my code on the line of 268 in the Editor Header, and use mine.
That line checks if it is necessary to omit the space or not. You can add the extra margin for the selected tab, and draw it in the line of 292.

It looks better to use my commit than these commits because mine has no bug so far.

Additionally, those commits are against the naming rule of other codes. Mine is following the rule.
I don't know why the variables like x_initial, size_selected, and non_selected_tab_size are admitted to exist. All other variables have the different naming rule as far as I know, don't it?

@soarcreator
Copy link
Author

New Feature: When finding and replacing the words, all these words are now highlighted yellow for the sake of visibility.

@per1234
Copy link
Collaborator

per1234 commented Sep 18, 2018

New Feature: When finding and replacing the words, all these words are now highlighted yellow for the sake of visibility.

@soarcreator it would be more appropriate to do that in a separate pull request since it's unrelated to the original proposal here. Create a separate feature branch in your repository for each pull request. Typically you would want to leave the master branch unmodified so that you can pull from the parent repository to that branch but that's not absolutely necessary.

@soarcreator
Copy link
Author

@per1234
I agree. I will separate it from this branch if it is undoable.
Thank you.

@soarcreator
Copy link
Author

I will close this pull request to separate these two changes.

@per1234
Copy link
Collaborator

per1234 commented Sep 18, 2018

The way I would do it is:

  1. Do an interactive rebase:
    git rebase -i 6da3e5fe20bed2c059050a4ba0a32630b2d33033
  2. In the text file that opens, delete the line for the off topic commit and save the file.
  3. Do a force push:
    git push -f

You could also use git reset instead of rebasing, but the interactive rebase is a more generally useful tool.

Note that this rewrites the history of your repository, which is not a good practice when other people might be relying on the history not changing and so generally should be avoided. However, in the case of a pull request, rewriting history is fine, and in fact preferred to the alternatives as a way to ensure a clean commit history if the PR is merged. It's probably a good idea to leave a note in the comment thread after rewriting a PR's commit history so that it's clear what happened.

The alternative would be to simply push a new commit that reverts the unwanted commit. It is possible for the repository maintainers to do a "squash merge" of the pull request that will convert multiple commits of the PR into a single commit but this relies on the maintainer actually doing that. In my own PRs, I prefer to take proactive action to ensure the commit history generated by my PR is as I intended, rather than putting the responsibility on the maintainer to remember to do the right thing and figure out how GitHub's squash merge feature works.

@per1234 per1234 added Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) Component: IDE user interface The Arduino IDE's user interface Type: Duplicate Another item already exists for this topic and removed On Hold The pull request is blocked from being merged labels Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix) IDE 1.9.x Beta Related to the Arduino IDE Beta Build Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants