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

Find methods to add alt text and captions for figures and table generated by user (so they can use the add_alttext fxn for it as well) #156

Closed
sbreitbart-NOAA opened this issue Jan 24, 2025 · 0 comments · Fixed by #162
Assignees
Milestone

Comments

@sbreitbart-NOAA
Copy link
Collaborator

sbreitbart-NOAA commented Jan 24, 2025

Write vignette explaining suggested workflow for editing captions/alttext for custom tables and figures

@sbreitbart-NOAA sbreitbart-NOAA self-assigned this Jan 24, 2025
@sbreitbart-NOAA sbreitbart-NOAA added this to the 2025 Q2 Goals milestone Jan 24, 2025
@sbreitbart-NOAA sbreitbart-NOAA linked a pull request Feb 12, 2025 that will close this issue
Schiano-NOAA added a commit that referenced this issue Feb 24, 2025
* Feat(vignettes):
-added tables of contents to vignettes
-added tip for how to edit rda files to a11y vignette
-added link to faqs vignette to a11y vignette re: how to edit alt text and captions

* fix to incorrect reference in .bib file (#149)

* fix incorrect reference

* add url to reference fix

* remove replicate nmfs palette and add_theme

* remove files

* Custom template fixes (#143)

* update(create_template): comment out skeleton pop up at the end

* update(add_section): add functionality for putting new subsection into section

* Update(add_section): fix pathing for locating section to place code and change from add_chunk to add_child

* update(create_template): select only custom_sections when user wants to make a different outline of report

custom must = TRUE otherwise copies all files

* Fix(create_template): adjust if statement argument for custom_sections

* Add nmfspalette package back in

* removed add_theme and associated test and documentation

* remove static NOAA Fishies in authorship

* update NOAA fisheries affiliations

Co-authored-by: Schiano-NOAA <[email protected]>

---------

Co-authored-by: sbreitbart-NOAA <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Schiano-NOAA <[email protected]>

* Fix(create_template):
-Fix so that rda files can be added as input, if already created, OR generated if model results are included as an argument.
-Update documentation

* update(format_quarto): add functionality for html formatting with associated files and changes to create_template (#152)

* small comment update

* update(create_template): custom_sections adds all selected plus refs, acknow, and tables and figs if desired

* Custom template fixes (#143)

* update(create_template): comment out skeleton pop up at the end

* update(add_section): add functionality for putting new subsection into section

* Update(add_section): fix pathing for locating section to place code and change from add_chunk to add_child

* update(create_template): select only custom_sections when user wants to make a different outline of report

custom must = TRUE otherwise copies all files

* Fix(create_template): adjust if statement argument for custom_sections

* Add nmfspalette package back in

* removed add_theme and associated test and documentation

* remove static NOAA Fishies in authorship

* update NOAA fisheries affiliations

Co-authored-by: sbreitbart-NOAA <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Schiano-NOAA <[email protected]>

* Inject accessibility (#124)

* Custom template fixes (#143)

* update(create_template): comment out skeleton pop up at the end

* update(add_section): add functionality for putting new subsection into section

* Update(add_section): fix pathing for locating section to place code and change from add_chunk to add_child

* update(create_template): select only custom_sections when user wants to make a different outline of report

custom must = TRUE otherwise copies all files

* Fix(create_template): adjust if statement argument for custom_sections



* Removed captions_alt_text_template.csv because it's not used in asar... only satf. Then updated a11y vignette to reflect where users should look for the file.

* changed eval for first chunk to true, and eval for indices table setup chunk to false, re: #102 . Will change eval to true for all chunks once indices table fxn is completed.

* feature(add new template partial for accessibility and add fxn)

* Update(add_tagging): ability to add alternative text to tex file from rdas

* fix(add_taggig): change directory for rda files to arg

* fix(add_tagging): change pathing to rda_dir

* fix(add-tagging): rename accessibility tex for output

* feature(add_accessibility): rename function and load documentation

* Initial commit for add_accessibility test - commented out bc unfinished

* update(test-add_accessibility): add snapshot for tex file and add proper code for testing

* feature(alter accessibility fxns): split up funxtion into two and called both using the add_accessibility function

Also adjusted testing function for add_alttext and removed old snapshot - was not working properly

* Remove nmfspallete from dependencies temporarily (#139)

* Remove nmfs-pallete from dependencies temporarily

* Comment out reference to nmfs pallete in add_theme and tests

* style and docs: run devtools::document() and styler::style_pkg() (#140)

Co-authored-by: Schiano-NOAA <[email protected]>

* Add nmfspalette back into package

* Merge newer dev branch into old (#148)

* Minor grammatical changes just to set up new dev-1.1 branch (changed quarto --> Quarto)

* Feat(vignettes):
-added tables of contents to vignettes
-added tip for how to edit rda files to a11y vignette
-added link to faqs vignette to a11y vignette re: how to edit alt text and captions

* remove old package from namespace and add in new

* add notes for new alttext test

* Removed captions_alt_text_template.csv because it's not used in asar... only satf. Then updated a11y vignette to reflect where users should look for the file.

* feature(alter accessibility fxns): split up funxtion into two and called both using the add_accessibility function

Also adjusted testing function for add_alttext and removed old snapshot - was not working properly

* update(create_template): custom_sections adds all selected plus refs, acknow, and tables and figs if desired

* add spp_conout.csv to gitignore during testing

* feature(add_alttext): add accessibility for user to add alt text to figures inserted into the outline (png)

* fix(add_alttext): improve fxning for adding alt text to custom figs either from images or code chunks

* feature(add_alttext): add example to function

* comment out alttext fxn test

* clean up fxns and add examples

* add in support_file/accessibilit.tex

* fix(create_tables_doc): remove incorrect and duplicate indices table code

* update(accessibility fxns): update to fix minor issues with functions and documentation as mentioned by @sbreitbart-NOAA

* update documentation

* update(test-alttext): change test for alttext to mimic changes to the function - sdoes not work still

* update(a11y fxns): improvements to functions as well as tests

* update(add_alttext): update example to show to to use rename arg

* minor updates and changes to fix test failures and checks

* Feat(create_tables_doc): automatically test if tables are wide enough to require changing page orientation from portrait to landscape. Alter the Tables qmd to allow orientation changes for each table, if necessary.

* Update orientation-related code for still-in-dev landings table

* Extend landscape table width from 7.5 to 8.5"; add page breaks between tables

* bug fixes

* Started coding new function to handle super wide tables and split into smaller ones

* Finished first full draft of function that will render large tables by splitting into multiple tables

* Added essential_columns arg to render_lg_table()

* Move orientation-detecting code into own function in utils, then update create_tables_doc

* Moved render_lg_table fxn to own R script, then updated documentation

* Update tests to remove temporary files upon test completion

* Add more params to render_lg_table() and ID_pg_orientation(), then update documentation and usage in create_tables_doc()

* Added code into create_tables_doc that splits extra-wide tables into multiple smaller tables, but still a bug in render_lg_table (producing "Error" as part of output when testing)

* Found a solution for sourcing render_lg_table in 08_tables.qmd and successfully rendering extra-wide table with new solution, but need to check if this will work in other circumstances

* found a successful workflow and applied it to indices table. Next step: apply to other tables, and simplify/clarify the new functions

* Copied new changes to bnc table, but referencing a chunk with multiple tables will only reference the last table in the chunk, not the first. So next step: make a chunk for each table.
Also removed now irrelevant function: ID_split_tbls

* Redesigned create_tables_doc so that each table has its own chunk and can be referenced.

* Updated landings table code

* Removed "-plot" from create_figures/tables_doc chunks

* Add note to create_tables_doc explaining why new rda with split tables is made; update documentation

* First draft of render_lg_table test; update documentation

* Remove code from create_tables_doc that reduces row height in tables

* update terminal sb naming to match other conventions

* Added Q&A about figure/table order to FAQs vignette

* Updated create_tables_doc so that split tables include header values in parentheses after caption (example: <indices caption> (Fleet 6, Fleet 7))

* Updated examples

* Clarified comments; renamed some variables to be unique and more clear; removed unnecessary and repetitious code

* Add vignette for convert_output fxn (#161)

* feature(convert output vignette): initial commit for article describing the convert output function

* feature(conout vignette): add in more information including example dataframe (needs adjustment to code chunk)

* minor improvements to convert_output vignette

* update(convert output vignette): add links to function and parts of code; add useful functions outside of asar used in function

* finish(convert output vignette): add in flowchart and final details

* add(conout-vignette): update chunk displatying example data

* Update vignettes/convert_output_details.Rmd

Co-authored-by: Sophie Breitbart <[email protected]>

* Update vignettes/convert_output_details.Rmd

Co-authored-by: Sophie Breitbart <[email protected]>

* Update vignettes/convert_output_details.Rmd

Co-authored-by: Sophie Breitbart <[email protected]>

* Update vignettes/convert_output_details.Rmd

Co-authored-by: Sophie Breitbart <[email protected]>

* fix(conout vignette): clarity to the text per comments made from @sbreitbart-NOAA

* update(conout vignette): add finishing touches to convert output vignette

* Fix translation of R0 parameter from BAM in convert_output (#163)

* fix(convert_output): fix error when parameters containing a number were incorrectly labelled in the final df

* First full draft of vignette re: #156

* fix(dev): remove add_accessibility and add_tagging functions since they are still in development until we can make the change to work alt text and tagging together

* Converting vignette's option comparison table to flextable

* update(add_alttext): change search name for figures to reflect change to rendering naming convention

* update(add_alttext): additional line to find old naming conventions from figures processed from quarto

* note(add_alttext): add TODO in fxn for rendering to html or docx if applicable down the line

---------

Co-authored-by: sbreitbart-NOAA <[email protected]>
Co-authored-by: Ian Taylor <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Schiano-NOAA <[email protected]>
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 a pull request may close this issue.

1 participant