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

Skip to content

Added foot note plus several enhancements and code improvements #137

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 7 commits into from
Jun 2, 2019

Conversation

ema2159
Copy link
Contributor

@ema2159 ema2159 commented May 31, 2019

Created a customizable footnote with its own customizable icon. Respected the most I could @seagle0128 implementation in Centaur to try and not mess up his cool config. It looks like this:
DeepinScreenshot_select-area_20190531015917
Also, improved a little bit the order of the code with things like for example generalizing the banner title, init info and foot note centering with a function.

Hope you like it and approve it! Please test it

@seagle0128
Copy link
Contributor

It looks fine with me except one minor issue above. Thank you!

@ema2159
Copy link
Contributor Author

ema2159 commented May 31, 2019

What issue? Emmacs? That's not an error jaja, my name is Emmanuel, Emma in short so I like to mess calling Emacs Emmacs.

By the way I also modified the text banners face to match the headings and also enabled the init info for it which wasn't enabled.

I tried to use your center-line function but I couldn't understand how it worked so I used the piece of code that was originally on dashboard to center the content as the center-line function calling it before instead of after the centered text.

@seagle0128
Copy link
Contributor

Sorry! I started a code-review but forgot to submit the comments.

(defvar dashboard-footer-icon (all-the-icons-fileicon ...)

Should consider TTY. This may cause an exception.

Regarding dashboard-center-line, it's a little bit different from yours. It gets the actual width of this line, and inserts some spaces at the beginning. The reimplementation is to calculate with the string width. It's fine unless you don't know the string. In centaur navigator, I create some widget buttons, and I cannot get the string so use current-column to calculate the accurate width.

@ema2159
Copy link
Contributor Author

ema2159 commented May 31, 2019

By the way regarding the dashboard-navigator customization I was thinking about implementing it and came with the idea that the user passes an alist with the icon they want for the button, the text they want in it and the internal/external link that button accesses and that dashboard automatically built the navigator. I don't now how to make a "triple" alist though. Would you help me with an idea?

@seagle0128
Copy link
Contributor

seagle0128 commented May 31, 2019

@ema2159 dashboard-navigator should contain tag (including text and/or icon?), action, help-echo, etc. How about this list?

(defvar dashboard-navigator-alist
  '(("tag1" action1 "help1" face1 ...)
    ("tag2" action2 "help2" face2 ...)))

car, cdr etc. can access the items.

The essential items should be tag and action, so it could be

(defvar dashboard-navigator-alist
  '(("tag1" . action1)
    ("tag2" . action2)))

The widget style of the buttons is push-button or item.

Does that address your issue?

@ema2159
Copy link
Contributor Author

ema2159 commented May 31, 2019

@ema2159 dashboard-navigator should contain tag (including text and/or icon?), action, help-echo, etc. How about this list?

(defvar dashboard-navigator-alist
  '(("tag1" action1 "help1" face1 ...)
    ("tag2" action2 "help2" face2 ...)))

car, cdr etc. can access the items.

The essential items should be tag and action, so it could be

(defvar dashboard-navigator-alist
  '(("tag1" . action1)
    ("tag2" . action2)))

The widget style of the buttons is push-button or item.

Does that address your issue?

Yes! I'll try that, that'll make Dashboard a really complete and aesthetic package, more than it is right now. From there I don't know what enhancements can be done.

@ema2159
Copy link
Contributor Author

ema2159 commented May 31, 2019

@JesusMtnez I think this PR is good to go!
Edit: Wait a sec, I have a cool idea, I'll put a bunch of messages that will be selected randomly for the footer
Edit 2: Done! You can merge now!

@JesusMtnez
Copy link
Contributor

Thank you @ema2159 !! This is a really good job. I'll be busy tomorrow, but it'll try to merge it on Sunday or on Monday.

@ema2159
Copy link
Contributor Author

ema2159 commented May 31, 2019

@JesusMtnez no hay prisa! Do it when you can!

@JesusMtnez
Copy link
Contributor

Do you mind moving this last commit to it's own PR?

@ema2159
Copy link
Contributor Author

ema2159 commented Jun 1, 2019

Of course! It's only two lines tho so is it worth it?
Edit: Done already!

@JesusMtnez JesusMtnez merged commit 03e73c8 into emacs-dashboard:master Jun 2, 2019
@JesusMtnez
Copy link
Contributor

Thank you @ema2159 !!

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

Successfully merging this pull request may close these issues.

3 participants