Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add the navigator below the banner with the customized buttons. #143

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

Merged
merged 3 commits into from
Jun 4, 2019
Merged

Add the navigator below the banner with the customized buttons. #143

merged 3 commits into from
Jun 4, 2019

Conversation

seagle0128
Copy link
Contributor

@JesusMtnez @ema2159 , I port the navigator feature from my Centaur Emacs. Please review and merge. Thanks!

To show navigator below the banner:

(setq dashboard-set-navigator t)

To customize the buttons of the navigator like this:

;; Format: "icon title help action face"
(setq dashboard-navigator-buttons
      `((,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust 0.0)
         "Homepage"
         "Browse homepage"
         (lambda (&rest _) (browse-url "homepage")))
        ("β˜…" "Star" "Show stars" (lambda (&rest _) (show-stars)) 'warning)
        ("?" "Help" "?/h" #'show-help nil)))

@ema2159
Copy link
Contributor

ema2159 commented Jun 3, 2019

Hi Mr. Zhang! Yes I'll review it as soon as I can. It seems that the test for Emacs 25 isn't passing, it's probably due to a malformed expression caused by some macro that isn't available for Emacs 25 (i.e. when-let)
Edit: that was quick jaja

@seagle0128
Copy link
Contributor Author

@ema2159 The compatibility issue of Emacs 25 has been addressed.

@ema2159
Copy link
Contributor

ema2159 commented Jun 3, 2019

@seagle0128 Yes! you fixed it like 3 seconds before I commented it

@ema2159
Copy link
Contributor

ema2159 commented Jun 3, 2019

It works really really nice! however, doesn't it take too much space? Like, isn't the space between the navigator and the init info and the logo too big? Could that it be made a little bit more compact or maybe be customizable?
image

@ema2159
Copy link
Contributor

ema2159 commented Jun 3, 2019

Also, it could be pretty nice to add and option to configure the brackets to allow the user to remove them or maybe change their faces, like maybe give the user access to the button-prefix/suffix in the widget create function and also add the option to customize the icon face separtely. Besides from that it's a very very nice addition and it works pretty well, I personally like it a lot.

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jun 4, 2019

It works really really nice! however, doesn't it take too much space?

@ema2159 I think it's crowed for the page header. I got the screenshots below. I prefer the last one. If all like the first, I will change it.

image

image

Also, it could be pretty nice to add and option to configure the brackets

I will try to add an option and commit soon.

@JesusMtnez
Copy link
Contributor

Thank you @seagle0128 for this!! Looks pretty good!!

@ema2159 I think it's crowed for the page header. I got the screenshots below. I prefer the last one. If all like the first, I will change it.

I prefer the first one πŸ˜…. If all the widgets are enabled, I would rather see them than having that extra space.

@ema2159
Copy link
Contributor

ema2159 commented Jun 4, 2019

It's really subjective, I also prefer the first one but also understand Mr. Zhang. How big is your monitor tho @seagle0128 πŸ˜…? I work with a pretty big one and I don't have that much space jaja!

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jun 4, 2019

OK. I understand what you concern. I make it compact for now. An option can be added in future if necessary.
I am using Macbook Pro 13' plus one 27' 4K monitor :)

@ema2159
Copy link
Contributor

ema2159 commented Jun 4, 2019

That's pretty cool jaja! I think this one es ready to go, it works pretty good and simple! A dashboard-set-compact or something like that should do it yes. By the way, just to feel proud, we passed from this:
DeepinScreenshot_select-area_20190604093812

To this in about a month:
DeepinScreenshot_select-area_20190604093553

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jun 4, 2019

Yeah!!! Really happy to implement this in emacs-dashboard, although the users of Centaur have enjoyed this feature for a few months :-) It brings more customization and better performance indeed. Of course it also makes the configurations simpler and cleaner.

BTW, may need multiple lines of navigator, and the option dashboard-set-compact. They can be implemented in future if need.

I think it's ready to go now! Please merge, @JesusMtnez .

@JesusMtnez
Copy link
Contributor

@seagle0128 Again, really good job here! Thank you!!

Also, thank you @ema2159 also for all your support and contributions too.

I'll proceed to merge this :shipit:

@JesusMtnez JesusMtnez merged commit 77e0720 into emacs-dashboard:master Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants