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

Dashboard: Settings view context foundation (Publisher Logos) #3085

Merged

Conversation

BrittanyIRL
Copy link
Contributor

Summary

We don't have access to an API for this yet, just laying ground work for connecting UI to API via context.

Relevant Technical Choices

  • Following same patterning as google analytics.
  • Did not adjust for what data is returned in response to format reducer, will do that once we know what is going on.

To-do

User-facing changes

  • None

Testing Instructions

  • See that the publisher logos ui still renders in storybook. Honestly, this is pretty mellow - just wanted to do these changes separately after getting buy in on structure of useSettingsApi.

Addresses #2747

function PublisherLogoSettings() {

// eslint-disable-next-line no-unused-vars
function PublisherLogoSettings({ onUpdatePublisherLogo, publisherLogos }) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

will use these once OK to connect to fileUpload component. Wanted to pass them through to set up propTypes here.

@codecov
Copy link

codecov bot commented Jul 8, 2020

Codecov Report

Merging #3085 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3085   +/-   ##
=======================================
  Coverage   81.99%   82.00%           
=======================================
  Files         716      716           
  Lines       12049    12050    +1     
=======================================
+ Hits         9880     9881    +1     
  Misses       2169     2169           
Flag Coverage Δ
#karmatests 63.49% <100.00%> (+<0.01%) ⬆️
#unittests 66.51% <0.00%> (-0.01%) ⬇️
Impacted Files Coverage Δ
assets/src/dashboard/app/api/useSettingsApi.js 81.25% <ø> (ø)
assets/src/dashboard/app/reducer/settings.js 83.33% <ø> (ø)
...ts/src/dashboard/app/views/editorSettings/index.js 0.00% <ø> (ø)
...rd/app/views/editorSettings/publisherLogo/index.js 66.66% <100.00%> (+16.66%) ⬆️

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2020

Size Change: +15 B (0%)

Total Size: 1 MB

Filename Size Change
assets/js/stories-dashboard.js 526 kB +15 B (0%)
ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 269 B 0 B
assets/css/stories-dashboard.css 305 B 0 B
assets/css/web-stories-embed-block.css 515 B 0 B
assets/js/edit-story.js 458 kB 0 B
assets/js/web-stories-embed-block.js 15.7 kB 0 B

compressed-size-action

return (
<PublisherLogoSettings
onUpdatePublisherLogo={(e) => {
e.preventDefault();
Copy link
Contributor

Choose a reason for hiding this comment

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

Will we need to preventDefault for all usages of this logo? If so we could just bubble this up and then wrap the callback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nah this is just because there's nothing there yet since the fileUpload is separate and i hate it when storybook clicks send you out of the existing view.

@BrittanyIRL BrittanyIRL merged commit f035ee4 into master Jul 9, 2020
@BrittanyIRL BrittanyIRL deleted the feature/2747-wiring-publisher-logo-functionality branch July 9, 2020 16:58
@swissspidy swissspidy added the Type: Enhancement New feature or improvement of an existing feature label Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group: Dashboard Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants